internal UIElement(UIElement parent, string name, UDim2 position, UDim2 size) { Name = name; Position = position; Size = size; Parent = parent; }
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; }
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); }
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; }
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; }
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); } } }
public ImageLabel(UIElement parent, string name, UDim2 position, UDim2 size, Texture2D image, Color color) : base(parent, name, position, size) { Image = image; Color = color; }
public Frame(UIElement parent, string name, UDim2 pos, UDim2 size, Color bg) : base(parent, name, pos, size) { Background = bg; }