public Background(Element parent, string textureName) : base(textureName) { Frame = 0; Padding = Vector2.Zero; parent.AddChild(this); }
public Border(Element parent, string textureName) : base(textureName) { Pattern = true; // If not pattern, scale Frame = 0; Padding = Vector2.Zero; parent.AddChild(this); // TODO: Integrate Padding }
public Text(Element parent, string textureName) : base(textureName) { Font = Graphics.DefaultFont; Content = "Text"; SelectedForeColor = Color.White; ForeColor = Color.LightGray; ShadowColor = Color.Black; OutlineColor = Color.Black; Outline = true; Shadow = false; OutlineOffset = 1; ShadowOffset = 1; TextAlignment = TextAlign.MiddleCenter; parent.AddChild(this); }
public Button(Element parent, string textureName) : base(textureName) { ExecutionScript = ""; Size = new Vector2(100, 30); DrawMe = false; Background = new Background(this); Border = new Border(this); Content = new Text(this); //Background.Overlay = new Color(40, 40, 40, 255); //Border.Overlay = new Color(80, 80, 80, 255); Content.Content = "Button"; parent.AddChild(this); }