Ejemplo n.º 1
0
 public ListBox(int width, int height, PressedReturn ret)
 {
     this.width      = width;
     this.height     = height;
     elm             = new List <string> ();
     active          = true;
     SelectedElement = 0;
     vst             = 0;
     OnEnter         = ret;
 }
Ejemplo n.º 2
0
 public InputBoxMultiLine(int width, int height, PressedReturn returns)
 {
     this.width   = width;
     this.height  = height;
     returnMethod = returns;
     pos_c        = 0;
     inp          = new StringBuilder();
     active       = true;
     v_x          = 0;
     v_y          = 0;
     pc_x         = 0;
     pc_y         = 0;
 }
Ejemplo n.º 3
0
        public PasswordField(PressedReturn onEnter)
        {
            focused  = false;
            OnEnter  = onEnter;
            outBuild = new StringBuilder(8);
            int jar;

            for (jar = 0; jar < 8; jar++)
            {
                LCGIter(0);
                outBuild.Append(subo[(int)(seph % subo.Length)]);
            }
            inp   = new StringBuilder();
            pos_c = 0;
        }
Ejemplo n.º 4
0
 public Button(string label, int width, PressedReturn ret)
 {
     if (width < 5)
     {
         throw new ArgumentOutOfRangeException("width", "Button width must be larger than 4.");
     }
     if (label.Length + 4 > width)
     {
         text = label.Substring(width - 4);
     }
     else
     {
         int w = width - 4 - label.Length;
         text = new string (' ', w / 2) + label + new string (' ', (w + 1) / 2);
     }
     this.width = width;
     OnEnter    = ret;
     active     = true;
 }
Ejemplo n.º 5
0
 public InputBoxMini(int inputLength, PressedReturn returns)
 {
     length = inputLength; returnMethod = returns;
     pos_c  = 0;
     inp    = new StringBuilder();
 }