Exemple #1
0
        public static Widget Input(IView view, string text, int width, Font inputFont,
                                   Font inputHintFont, bool password, int maxChars, string hint)
        {
            InputWidget widget;

            if (view.widgets[view.widgetIndex] != null)
            {
                widget = (InputWidget)view.widgets[view.widgetIndex];
            }
            else
            {
                widget                         = new InputWidget(view.game);
                widget.Password                = password;
                widget.Chars.MaxChars          = maxChars;
                widget.HintText                = hint;
                view.widgets[view.widgetIndex] = widget;
            }

            widget.SetDrawData(view.game.Drawer, text,
                               inputFont, inputHintFont, width, 30);
            view.widgetIndex++;
            return(widget);
        }
Exemple #2
0
 public InputText(InputWidget input)
 {
     this.input = input;
 }