/// <summary> /// Create a new control. Call Refresh() to notify the control that its construction is completed. /// </summary> /// <param name="style">The default style to be used to render the control.</param> protected Control(ControlStyle style) { Position = Vector2.Zero; Visible = true; Enabled = true; DefaultStyle = style; _currentStyle = DefaultStyle; HoveredStyle = DefaultStyle; PressedStyle = DefaultStyle; HoveredPressedStyle = DefaultStyle; LabelAlignment = style.LabelAlignment; LabelOffset = style.LabelOffset; var name = GetType().BaseType.Name; }
public Label(ControlStyle style, string text) : base(style) { _text = text; }
public Checkbox(ControlStyle style, ControlStyle chk, ControlStyle chkHov, ControlStyle chkHovPress) : base(style) { CheckedStyle = chk; HoveredChecked = chkHov; HoveredCheckedPressedStyle = chkHovPress; }
public Label(ControlStyle style) : base(style) { }
public Button(ControlStyle style) : base(style) { }