Пример #1
0
 public SelectTextureBox(TextBoxEnterEvent enter)
     : base(null, "", enter, -1, Keys.Enter)
 {
     this.size = new Vector2(512, 512);
     Center();
     keys = TextureBin.GetDictionary.Keys.ToArray <String>();
 }
Пример #2
0
 public TextInputBox(String name, String text, TextBoxEnterEvent enterEvent, String defaultText, String suffix = "")
     : base(name, text, enterEvent)
 {
     field = new TextInputField(TextureBin.mainFont, this.position - Vector2.UnitY * 48, Keys.F12, suffix);
     field.enabled = true;
     field.inputString = defaultText;
 }
Пример #3
0
 public SelectTextureBox(TextBoxEnterEvent enter)
     : base(null, "", enter, -1, Keys.Enter)
 {
     this.size = new Vector2(512, 512);
     Center();
     keys = TextureBin.GetDictionary.Keys.ToArray<String>();
 }
Пример #4
0
 public TextInputBox(String name, String text, TextBoxEnterEvent enterEvent, String defaultText, String suffix = "")
     : base(name, text, enterEvent)
 {
     field             = new TextInputField(TextureBin.mainFont, this.position - Vector2.UnitY * 48, Keys.F12, suffix);
     field.enabled     = true;
     field.inputString = defaultText;
 }
Пример #5
0
 public SelectColorBox(TextBoxEnterEvent e, Color c)
     : base("", "", e, -1, Keys.Enter)
 {
     this.size = new Vector2(320, 256);
     Center();
     r = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 1 + 0 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Red, c.ToVector4().X);
     g = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 2 + 1 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Green, c.ToVector4().Y);
     b = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 3 + 2 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Blue, c.ToVector4().Z);
     a = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 4 + 3 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Gray, c.ToVector4().W);
 }
Пример #6
0
 public SelectColorBox(TextBoxEnterEvent e, Color c)
     : base("", "", e, -1, Keys.Enter)
 {
     this.size = new Vector2(320, 256);
     Center();
     r = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 1 + 0 * (this.size.X - SPACE) / BARS , 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Red, c.ToVector4().X);
     g = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 2 + 1 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Green, c.ToVector4().Y);
     b = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 3 + 2 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Blue, c.ToVector4().Z);
     a = new ColorDial(this.position + new Vector2((SPACE / (BARS + 1)) * 4 + 3 * (this.size.X - SPACE) / BARS, 8), new Vector2((this.size.X - SPACE) / BARS, this.size.Y - 48), Color.Gray, c.ToVector4().W);
 }
Пример #7
0
        public TextBox(String name, String text, TextBoxEnterEvent enterEvent, int timer = -1, Keys closeKey = Keys.Enter)
        {
            this.name = name;
            this.text = text;
            this.enterEvent = enterEvent;
            this.closeKey = closeKey;

            this.timer = timer;
            Scale();
            Center();
        }
Пример #8
0
        public TextBox(String name, String text, TextBoxEnterEvent enterEvent, int timer = -1, Keys closeKey = Keys.Enter)
        {
            this.name       = name;
            this.text       = text;
            this.enterEvent = enterEvent;
            this.closeKey   = closeKey;

            this.timer = timer;
            Scale();
            Center();
        }
Пример #9
0
 public TextInputBox(String name, String text, TextBoxEnterEvent enterEvent)
     : base(name, text, enterEvent)
 {
     field = new TextInputField(TextureBin.mainFont, this.position - Vector2.UnitY * 48, Keys.F12);
     field.enabled = true;
 }
Пример #10
0
 public TextInputBox(String name, String text, TextBoxEnterEvent enterEvent)
     : base(name, text, enterEvent)
 {
     field         = new TextInputField(TextureBin.mainFont, this.position - Vector2.UnitY * 48, Keys.F12);
     field.enabled = true;
 }