Beispiel #1
0
 public UIButton(float x, float y, float width, float height, string text, UIContainer parent, UISizeMethod sizing = UISizeMethod.UV) : base(x, y, width, height, parent, sizing)
 {
     label = new UILabel(0, 0, 1, 1, text, this, UISizeMethod.UV, UIAlignment.Center)
     {
         color = Color.Black
     };
 }
Beispiel #2
0
        public UIDropDown(float x, float y, float width, float height, UIContainer parent, UISizeMethod sizing = UISizeMethod.UV) : base(x, y, width, height, "---", parent, sizing)
        {
            new UIImage(0, 0, 1, 1, Textures.UI.DropDownArrow, label, UISizeMethod.UV);

            Click += (object sender, EventArgs e) =>
            {
                isOpen = !isOpen;
            };
        }
Beispiel #3
0
 public UIInteractable(float x, float y, float width, float height, UIContainer parent = null, UISizeMethod sizing = UISizeMethod.UV) : base(x, y, width, height, parent, sizing)
 {
 }
Beispiel #4
0
 public UILabel(float x, float y, float width, float height, string text, UIContainer parent = null, UISizeMethod sizing = UISizeMethod.UV, UIAlignment alignment = UIAlignment.Center) : base(x, y, width, height, parent, sizing)
 {
     Text           = text;
     this.alignment = alignment;
 }
Beispiel #5
0
 public UIImage(float x, float y, float width, float height, Texture2D texture, UIContainer parent = null, UISizeMethod sizing = UISizeMethod.UV) : base(x, y, width, height, parent, sizing)
 {
     this.texture = texture;
 }