Example #1
0
        public CheckBox(string name, ICheckBoxHandler handler)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            if (handler == null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            _handler = handler;
            Name     = name;

            Width  = 70;
            Height = 20;

            _checkBoxWidth = 70;
            Checked        = true;

            Location               = new Vector2(100, 100);
            Enabled                = true;
            Visible                = true;
            Text                   = "My Button";
            Color                  = Color.LightGray;
            OutlineColor           = Color.Gray;
            MouseOverColor         = Color.DimGray;
            CheckBoxMouseOverColor = Color.LightGray;
            TextColor              = Color.Black;
            MouseOverTextColor     = Color.DarkKhaki;

            DrawWindowChrome = true;
            _font            = Engine.Content.Load <SpriteFont>("default");
        }
Example #2
0
 public static void MapForeground(ICheckBoxHandler handler, ICheckBox check)
 {
     handler.PlatformView?.UpdateForeground(check);
 }
Example #3
0
 public static void MapIsChecked(ICheckBoxHandler handler, ICheckBox check)
 {
     handler.PlatformView?.UpdateIsChecked(check);
 }
Example #4
0
 public static void MapIsChecked(ICheckBoxHandler handler, ICheckBox check)
 {
 }
Example #5
0
 public static void MapForeground(ICheckBoxHandler handler, ICheckBox check)
 {
 }