示例#1
0
        /// <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;
        }
示例#2
0
 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;
 }
示例#4
0
 public Label(ControlStyle style) : base(style)
 {
 }
示例#5
0
 public Button(ControlStyle style) : base(style)
 {
 }