Exemplo n.º 1
0
        public static MenuInputWidget Create( Game game, int x, int y, int width, int height, string text, Anchor horizontal,
            Anchor vertical, Font font, Font tildeFont, Font hintFont, MenuInputValidator validator)
        {
            MenuInputWidget widget = new MenuInputWidget( game, font, tildeFont, hintFont );

            widget.HorizontalAnchor = horizontal;
            widget.VerticalAnchor = vertical;
            widget.XOffset = x;
            widget.YOffset = y;
            widget.DesiredMaxWidth = width;
            widget.DesiredMaxHeight = height;
            widget.chatInputText.Append( 0, text );
            widget.Validator = validator;
            widget.Init();
            return widget;
        }
Exemplo n.º 2
0
        public static MenuInputWidget Create(Game game, int x, int y, int width, int height, string text, Anchor horizontal,
                                             Anchor vertical, Font font, Font tildeFont, MenuInputValidator validator)
        {
            MenuInputWidget widget = new MenuInputWidget(game, font, tildeFont);

            widget.HorizontalAnchor = horizontal;
            widget.VerticalAnchor   = vertical;
            widget.XOffset          = x;
            widget.YOffset          = y;
            widget.DesiredMaxWidth  = width;
            widget.DesiredMaxHeight = height;
            widget.chatInputText.Append(0, text);
            widget.Validator = validator;
            widget.Init();
            return(widget);
        }