Ejemplo n.º 1
0
        public Title(SpriteFont font, string text, TextAlign alignment, Vector2 position, Color color)
        {
            _font      = font;
            Text       = text;
            Position   = position;
            _alignment = alignment;
            _color     = color;

            MenuList.AddMenuItem(this);
        }
Ejemplo n.º 2
0
        public Checkbox(Vector2 position, int size, Color boxColor, Color markedColor)
        {
            Position     = position;
            _size        = size;
            _boxColor    = boxColor;
            _markedColor = markedColor;

            //_checkedRectangle = new Rectangle(Rectangle.X + ((Rectangle.Width - ((int)(_size * 0.6f))) / 2), Rectangle.Y + ((Rectangle.Height - ((int)(_size * 0.6f))) / 2), (int)(_size * 0.6f), (int)(_size * 0.6f));

            MenuList.AddMenuItem(this);
        }
Ejemplo n.º 3
0
        public TextButton(int width, int height, Color baseColor, Color hoverColor, Color clickedColor, SpriteFont font, bool playSound)
        {
            _width        = width;
            _height       = height;
            _baseColor    = baseColor;
            _hoverColor   = hoverColor;
            _clickedColor = clickedColor;
            _font         = font;
            _playSound    = playSound;

            MenuList.AddMenuItem(this);
        }
Ejemplo n.º 4
0
        public Slider(int width, int height, int x, int y, Color barColor, Color knobColor, Color hoverColor, Color clickedColor)
        {
            _width = width;
            int knobWidth = _width / 15;

            _height       = height;
            _x            = x;
            _y            = y;
            _barColor     = barColor;
            _knobColor    = knobColor;
            _hoverColor   = hoverColor;
            _clickedColor = clickedColor;

            _barRectangle  = new Rectangle(_x - (_width / 2), _y, _width, _height);
            _knobRectangle = new Rectangle(_barRectangle.X + (_barRectangle.Width / 2 - knobWidth / 2), _y, knobWidth, _barRectangle.Height);

            CalculateValue();

            MenuList.AddMenuItem(this);
        }