Exemplo n.º 1
0
 public Control(string fontFile = "TimesNewRoman12")
 {
     locAndSize    = new Rectangle(0, 0, 0, 0);
     controls      = new List <Control>();
     firstClickLoc = Vector2.Zero;
     alignment     = ControlAlignment.Left;
     isVisible     = true;
     isActive      = true;
     isDrawn       = true;
     alignApplied  = false;
     parent        = null;
     this.fontFile = fontFile;
     borderInfo    = new BorderInfo(1, Color.Black);
     fillInfo      = new FillInfo(Color.Gray);
 }
Exemplo n.º 2
0
        public Button()
        {
            this.Hover   += Button_Hover;
            this.Pressed += Button_Pressed;

            defaultBorder = new BorderInfo(this.Border.Value.width, Color.Black);
            defaultFill   = new FillInfo(Color.Gray);

            hoverBorder   = new BorderInfo(this.Border.Value.width, Color.White);
            pressedBorder = new BorderInfo(this.Border.Value.width, Color.LightGray);

            hoverFill   = new FillInfo(Color.Gray);
            pressedFill = new FillInfo(Color.LightGray);

            text            = new Label();
            text.Text       = String.Empty;
            text.AutoResize = true;
            text.Alignment  = ControlAlignment.Center;
            //text.parent = this;
            Add(text);
        }
Exemplo n.º 3
0
        public Button()
        {
            this.Hover += Button_Hover;
            this.Pressed += Button_Pressed;

            defaultBorder = new BorderInfo(this.Border.Value.width, Color.Black);
            defaultFill = new FillInfo(Color.Gray);

            hoverBorder = new BorderInfo(this.Border.Value.width, Color.White);
            pressedBorder = new BorderInfo(this.Border.Value.width, Color.LightGray);

            hoverFill = new FillInfo(Color.Gray);
            pressedFill = new FillInfo(Color.LightGray);

            text = new Label();
            text.Text = String.Empty;
            text.AutoResize = true;
            text.Alignment = ControlAlignment.Center;
            //text.parent = this;
            Add(text);
        }
Exemplo n.º 4
0
 public Control(string fontFile = "TimesNewRoman12")
 {
     locAndSize = new Rectangle(0, 0, 0, 0);
     controls = new List<Control>();
     firstClickLoc = Vector2.Zero;
     alignment = ControlAlignment.Left;
     isVisible = true;
     isActive = true;
     isDrawn = true;
     alignApplied = false;
     parent = null;
     this.fontFile = fontFile;
     borderInfo = new BorderInfo(1, Color.Black);
     fillInfo = new FillInfo(Color.Gray);
 }