コード例 #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;
 }
コード例 #3
0
 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)
 {
 }