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 static FloatPropertyPanel AddStepProperty(IPeriodicFiller periodicStyle, UIComponent parent) { var stepProperty = ComponentPool.Get <FloatPropertyPanel>(parent); stepProperty.Text = Localize.StyleOption_Step; stepProperty.UseWheel = true; stepProperty.WheelStep = 0.1f; stepProperty.WheelTip = Editor.WheelTip; stepProperty.CheckMin = true; stepProperty.MinValue = 1.5f; stepProperty.Init(); stepProperty.Value = periodicStyle.Step; stepProperty.OnValueChanged += (float value) => periodicStyle.Step.Value = value; return(stepProperty); }