public Button(UI _parent, string _name, string _text, int _x, int _y, int _width, int _height, Color _color) : base(_parent) { parent = _parent; name = _name; text = _text; relX = _x; relY = _y; fontColor = _color; color = _color; backgroundColor = new Color(0f, 0f, 0f, 0.0f); backgroundHoverColor = new Color(0.1f, 0.1f, 0.1f, 1.0f); backgroundPressColor = new Color(0f, 0f, 0f, 0.0f); vertAlignment = VertAlignments.AlignMiddle; horizAlignment = HorizAlignments.AlignCenter; width = _width; height = _height; fontSize = FontSizes.Small; }
public Frame(UI _parent, int _width, int _height) : base(_parent) { width = _width; height = _height; parent = _parent; }
public Toggle(UI _parent, string _name, int _x, int _y, int _width, int _height) : base(_parent) { parent = _parent; name = _name; relX = _x; relY = _y; width = _width; height = _height; //fontSize = FontSizes.Medium; backgroundColor = new Color(1f, 1f, 1f, 0.2f); backgroundHoverColor = new Color(0f, 0f, 0f, 0.6f); backgroundPressColor = new Color(0f, 0f, 0f, 0.8f); }
public Label(UI _parent, string _name, string _text, int _x, int _y, Color _color) : base(_parent) { parent = _parent; name = _name; text = _text; relX = _x; relY = _y; fontColor = _color; color = _color; backgroundColor = new Color(0f, 0f, 0f, 0.0f); backgroundHoverColor = new Color(0f, 0f, 0f, 0.0f); backgroundPressColor = new Color(0f, 0f, 0f, 0.0f); vertAlignment = VertAlignments.AlignMiddle; horizAlignment = HorizAlignments.AlignCenter; }
public Dropdown(UI _parent, string _name, string _text, int _x, int _y) : this(_parent, _name, _text, _x, _y, Color.Black) { }
public Button(UI _parent, string _name, string _text, int _x, int _y, int _width, int _height) : this(_parent, _name, _text, _x, _y, _width, _height, Color.White) { }
public UI(UI _parent) { parent = _parent; }
public void AddChild(UI _child) { //TODO: Check if the child object's name is unique. if (_child.name == "") throw (new Exception("Name wasn't set on UI object")); ChildObjects.Add(_child); }