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); }
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); }
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); }