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); }
public new virtual Text DeepClone() { Text s = new Text(Parent); s.Position = Position; s.Size = Size; s.TextureName = TextureName; s.Scale = Scale; s.Rotation = Rotation; s.Origin = Origin; s.Overlay = Overlay; s.Effects = Effects; s.CurrentFrame = CurrentFrame; s.AnimationSetName = AnimationSetName; s.Parent = Parent; s.Children = new List<Element>(); for (int i = 0; i < Children.Count; i++) { s.Children.Add(Children[i].DeepClone()); } s.DrawMe = DrawMe; s.Selected = Selected; s.Disabled = Disabled; s.Font = Font; s.Content = Content; s.ForeColor = ForeColor; s.SelectedForeColor = SelectedForeColor; s.ShadowColor = ShadowColor; s.OutlineColor = OutlineColor; s.Outline = Outline; s.OutlineOffset = OutlineOffset; s.ShadowOffset = ShadowOffset; s.TextAlignment = TextAlignment; return s; }