SetAlignment() публичный Метод

public SetAlignment ( bool isRightAligned ) : void
isRightAligned bool
Результат void
Пример #1
0
        public bool Initialize(int xPos, int yPos, int width, int min, int max, int initialAmount, Random r, out string reason)
        {
            _enabled = true;
            _upButtonEnabled = true;

            _width = width;

            _upButton = new BBButton();
            _downButton = new BBButton();
            _valueLabel = new BBLabel();

            if (!_upButton.Initialize("ScrollUpBGButton", "ScrollUpFGButton", string.Empty, ButtonTextAlignment.LEFT, xPos + width - 16, yPos, 16, 16, r, out reason))
            {
                return false;
            }
            if (!_downButton.Initialize("ScrollDownBGButton", "ScrollDownFGButton", string.Empty, ButtonTextAlignment.LEFT, xPos, yPos, 16, 16, r, out reason))
            {
                return false;
            }
            if (!_valueLabel.Initialize(xPos + width - 20, yPos, string.Empty, Color.White, out reason))
            {
                return false;
            }
            _valueLabel.SetAlignment(true);

            _minimum = min;
            _maximum = max;
            Value = initialAmount;
            CheckAmount(); //Just in case

            _incrementAmount = 1;

            return true;
        }