Esempio n. 1
0
 public new virtual Border DeepClone()
 {
     Border s = new Border(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.Pattern = Pattern;
     s.Frame = Frame;
     s.Padding = Padding;
     return s;
 }
Esempio n. 2
0
        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);
        }