Example #1
0
        internal Slider(PicoGui gui, Container parent, int value, int minValue, int maxValue, int step, Orientation orientation) : base(gui, parent)
        {
            W = DefaultSize.Width;
            H = DefaultSize.Height;

            this._minValue = minValue;
            this._maxValue = maxValue;

            if (this._minValue > this._maxValue)
            {
                var temp = this._maxValue;
                this._maxValue = this._minValue;
                this._minValue = temp;
            }

            this._value       = Calculate.Clamp(value, this._minValue, this._maxValue);
            this._step        = Calculate.Clamp(step, 1, _maxValue);
            this._orientation = orientation;

            if (_orientation == Orientation.Vertical)
            {
                int temp = W;
                W = H;
                H = temp;
            }
        }
Example #2
0
 internal Container(PicoGui gui, Container parent) : base(gui, parent)
 {
     W         = parent.W;
     H         = parent.H;
     _children =
         new List <Widget>();
     _widgetMap = new Dictionary <string, int>();
 }
Example #3
0
 internal Container(PicoGui gui, int width, int height) : base(gui)
 {
     W         = width;
     H         = height;
     _children =
         new List <Widget>();
     _widgetMap = new Dictionary <string, int>();
 }
Example #4
0
        internal PicoGui(PicoGfx gfx, int width, int height)
        {
            _guiSurface = new PicoSurface(gfx, width, height, PicoSurface.AccessType.Target);

            _uiMouseState = new UIMouseState();

            _theme = new DefaultTheme();

            _root = new Container(this, width, height);

            PicoGui.Instance = this;
        }
Example #5
0
 internal Panel(PicoGui gui, Container parent) : base(gui, parent)
 {
     W = DefaultSize.Width;
     H = DefaultSize.Height;
 }
Example #6
0
 internal HorizontalContainer(PicoGui gui, Container parent) : base(gui, parent)
 {
 }
Example #7
0
 internal VerticalContainer(PicoGui gui, Container parent) : base(gui, parent)
 {
 }
Example #8
0
 protected Widget(PicoGui gui, Container parent)
 {
     Gui    = gui;
     Parent = parent;
 }
Example #9
0
 protected Widget(PicoGui gui)
 {
     Gui    = gui;
     Parent = null;
 }