Exemplo n.º 1
0
 internal UIElement(UIElement parent, string name, UDim2 position, UDim2 size)
 {
     Name     = name;
     Position = position;
     Size     = size;
     Parent   = parent;
 }
Exemplo n.º 2
0
 public TextLabel(UIElement parent, string name, UDim2 position, UDim2 size, string text, string font, Color color) : base(parent, name, position, size)
 {
     Text          = text;
     Font          = font;
     Color         = color;
     TextScale     = 1;
     TextAlignment = AlignmentType.Center;
 }
Exemplo n.º 3
0
        public CommandLine(UIElement parent, string name, UDim2 position, UDim2 size, string text, string font, Color color) : base(parent, name, position, size, text, font, color)
        {
            messages      = new List <string>();
            prev          = new List <string>();
            DefaultText   = ">";
            TextAlignment = AlignmentType.CenterLeft;

            Commands = new Dictionary <string, Command>();
            Commands.Add("give", GiveItem);
        }
Exemplo n.º 4
0
 public TextBox(UIElement parent, string name, UDim2 position, UDim2 size, string text, string font, Color color1) : base(parent, name, position, size)
 {
     DefaultText   = "";
     Text          = text;
     Font          = font;
     TextScale     = 1;
     TextColor     = color1;
     TextAlignment = AlignmentType.Center;
     BgColor       = Color.Black;
     CursorPos     = 0;
 }
Exemplo n.º 5
0
 public TextButton(UIElement parent, string name, UDim2 position, UDim2 size, string text, string font, Color color1, Color color2, Action action) : base(parent, name, position, size)
 {
     Text          = text;
     this.action   = action;
     Font          = font;
     TextScale     = 1;
     Color1        = color1;
     Color2        = color2;
     TextAlignment = AlignmentType.Center;
     bgColor1      = Color.Black;
     bgColor2      = Color.White;
 }
Exemplo n.º 6
0
 public ImageButton(UIElement parent, string name, UDim2 position, UDim2 size, Texture2D icon, Rectangle?src, Color c1, Color c2, Action action) : base(parent, name, position, size)
 {
     this.action = action;
     Icon        = icon;
     Color1      = c1;
     Color2      = c2;
     if (src.HasValue)
     {
         SrcRect = src.Value;
     }
     else
     {
         if (icon != null)
         {
             SrcRect = new Rectangle(0, 0, icon.Width, icon.Height);
         }
         else
         {
             SrcRect = new Rectangle(0, 0, 0, 0);
         }
     }
 }
Exemplo n.º 7
0
 public ImageLabel(UIElement parent, string name, UDim2 position, UDim2 size, Texture2D image, Color color) : base(parent, name, position, size)
 {
     Image = image;
     Color = color;
 }
Exemplo n.º 8
0
 public Frame(UIElement parent, string name, UDim2 pos, UDim2 size, Color bg) : base(parent, name, pos, size)
 {
     Background = bg;
 }