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; } }
internal Container(PicoGui gui, Container parent) : base(gui, parent) { W = parent.W; H = parent.H; _children = new List <Widget>(); _widgetMap = new Dictionary <string, int>(); }
internal Container(PicoGui gui, int width, int height) : base(gui) { W = width; H = height; _children = new List <Widget>(); _widgetMap = new Dictionary <string, int>(); }
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; }
internal Panel(PicoGui gui, Container parent) : base(gui, parent) { W = DefaultSize.Width; H = DefaultSize.Height; }
internal HorizontalContainer(PicoGui gui, Container parent) : base(gui, parent) { }
internal VerticalContainer(PicoGui gui, Container parent) : base(gui, parent) { }
protected Widget(PicoGui gui, Container parent) { Gui = gui; Parent = parent; }
protected Widget(PicoGui gui) { Gui = gui; Parent = null; }