Beispiel #1
0
        protected static FloatPropertyPanel AddHeightProperty(ISharkLine sharkTeethStyle, UIComponent parent)
        {
            var heightProperty = ComponentPool.Get <FloatPropertyPanel>(parent);

            heightProperty.Text      = Localize.StyleOption_SharkToothHeight;
            heightProperty.UseWheel  = true;
            heightProperty.WheelStep = 0.1f;
            heightProperty.WheelTip  = Editor.WheelTip;
            heightProperty.CheckMin  = true;
            heightProperty.MinValue  = 0.3f;
            heightProperty.Init();
            heightProperty.Value           = sharkTeethStyle.Height;
            heightProperty.OnValueChanged += (float value) => sharkTeethStyle.Height.Value = value;

            return(heightProperty);
        }
Beispiel #2
0
        protected FloatPropertyPanel AddSpaceProperty(ISharkLine sharkTeethStyle, UIComponent parent)
        {
            var spaceProperty = ComponentPool.Get <FloatPropertyPanel>(parent, nameof(sharkTeethStyle.Space));

            spaceProperty.Text      = Localize.StyleOption_SharkToothSpace;
            spaceProperty.UseWheel  = true;
            spaceProperty.WheelStep = 0.1f;
            spaceProperty.WheelTip  = Editor.WheelTip;
            spaceProperty.CheckMin  = true;
            spaceProperty.MinValue  = 0.1f;
            spaceProperty.Init();
            spaceProperty.Value           = sharkTeethStyle.Space;
            spaceProperty.OnValueChanged += (float value) => sharkTeethStyle.Space.Value = value;

            return(spaceProperty);
        }
Beispiel #3
0
        protected FloatPropertyPanel AddHeightProperty(ISharkLine sharkTeethStyle, UIComponent parent)
        {
            var heightProperty = ComponentPool.Get <FloatPropertyPanel>(parent, nameof(sharkTeethStyle.Height));

            heightProperty.Text      = Localize.StyleOption_SharkToothHeight;
            heightProperty.Format    = Localize.NumberFormat_Meter;
            heightProperty.UseWheel  = true;
            heightProperty.WheelStep = 0.1f;
            heightProperty.WheelTip  = Settings.ShowToolTip;
            heightProperty.CheckMin  = true;
            heightProperty.MinValue  = 0.3f;
            heightProperty.Init();
            heightProperty.Value           = sharkTeethStyle.Height;
            heightProperty.OnValueChanged += (float value) => sharkTeethStyle.Height.Value = value;

            return(heightProperty);
        }