protected BoolListPropertyPanel AddUseSecondColorProperty(UIComponent parent) { var useSecondColorProperty = ComponentPool.GetBefore <BoolListPropertyPanel>(parent, nameof(Color), nameof(UseSecondColor)); useSecondColorProperty.Text = Localize.StyleOption_ColorCount; useSecondColorProperty.Init(Localize.StyleOption_ColorCountOne, Localize.StyleOption_ColorCountTwo, false); useSecondColorProperty.SelectedObject = UseSecondColor; useSecondColorProperty.OnSelectObjectChanged += (value) => UseSecondColor.Value = value; return(useSecondColorProperty); }
protected FloatPropertyPanel AddStepProperty(IPeriodicFiller periodicStyle, UIComponent parent) { var stepProperty = ComponentPool.GetBefore <FloatPropertyPanel>(parent, nameof(LineOffset), nameof(periodicStyle.Step)); stepProperty.Text = Localize.StyleOption_Step; stepProperty.UseWheel = true; stepProperty.WheelStep = 0.1f; stepProperty.WheelTip = Settings.ShowToolTip; stepProperty.CheckMin = true; stepProperty.MinValue = 1.5f; stepProperty.Init(); stepProperty.Value = periodicStyle.Step; stepProperty.OnValueChanged += (float value) => periodicStyle.Step.Value = value; return(stepProperty); }
protected FloatPropertyPanel AddAngleProperty(IRotateFiller rotateStyle, UIComponent parent) { var angleProperty = ComponentPool.GetBefore <FloatPropertyPanel>(parent, nameof(MedianOffset), nameof(rotateStyle.Angle)); angleProperty.Text = Localize.StyleOption_Angle; angleProperty.UseWheel = true; angleProperty.WheelStep = 1f; angleProperty.WheelTip = Editor.WheelTip; angleProperty.CheckMin = true; angleProperty.MinValue = -90; angleProperty.CheckMax = true; angleProperty.MaxValue = 90; angleProperty.CyclicalValue = true; angleProperty.Init(); angleProperty.Value = rotateStyle.Angle; angleProperty.OnValueChanged += (float value) => rotateStyle.Angle.Value = value; return(angleProperty); }