protected TGUIObject(Vector2 Pos, Vector2 Size) { this.Parent = null; this.Pos = Pos; this.Size = Size; Text = ""; TextColor = Color.White; AutoSize = false; Font = 1; BorderSize = 1; Visible = true; }
// Add a component to be drawned public TGUIObject AddComponent(TGUIObject Component) { Components.Add(Component); Component.Parent = this; if (Component is TGUIImgBtn) (Component as TGUIImgBtn).Tag = Components.Count - 1; return Components[Components.Count - 1]; }
// Creator public TGUIObject(TGUIObject Parent) { this.Parent = Parent; Pos = new Vector2(0, 0); Size = new Vector2(1, 1); Text = ""; TextColor = Color.White; Font = 1; AutoSize = false; BorderSize = 1; Visible = true; Enabled = true; }