예제 #1
0
        protected static IntPropertyPanel AddLineCountProperty(ChessBoardCrosswalkStyle chessBoardStyle, UIComponent parent)
        {
            var lineCountProperty = ComponentPool.Get <IntPropertyPanel>(parent);

            lineCountProperty.Text      = Localize.StyleOption_LineCount;
            lineCountProperty.UseWheel  = true;
            lineCountProperty.WheelStep = 1;
            lineCountProperty.WheelTip  = Editor.WheelTip;
            lineCountProperty.CheckMin  = true;
            lineCountProperty.MinValue  = DefaultCrosswalkLineCount;
            lineCountProperty.Init();
            lineCountProperty.Value           = chessBoardStyle.LineCount;
            lineCountProperty.OnValueChanged += (int value) => chessBoardStyle.LineCount.Value = value;

            return(lineCountProperty);
        }
예제 #2
0
        protected static FloatPropertyPanel AddSquareSideProperty(ChessBoardCrosswalkStyle chessBoardStyle, UIComponent parent)
        {
            var squareSideProperty = ComponentPool.Get <FloatPropertyPanel>(parent);

            squareSideProperty.Text      = Localize.StyleOption_SquareSide;
            squareSideProperty.UseWheel  = true;
            squareSideProperty.WheelStep = 0.1f;
            squareSideProperty.WheelTip  = Editor.WheelTip;
            squareSideProperty.CheckMin  = true;
            squareSideProperty.MinValue  = 0.1f;
            squareSideProperty.Init();
            squareSideProperty.Value           = chessBoardStyle.SquareSide;
            squareSideProperty.OnValueChanged += (float value) => chessBoardStyle.SquareSide.Value = value;

            return(squareSideProperty);
        }