예제 #1
0
        public TextInputWidget( Game game, Font font, Font boldFont )
            : base(game)
        {
            HorizontalAnchor = Anchor.LeftOrTop;
            VerticalAnchor = Anchor.BottomOrRight;
            typingLogPos = game.Chat.InputLog.Count; // Index of newest entry + 1.

            this.font = font;
            this.boldFont = boldFont;
            chatInputText = new WrappableStringBuffer( len );
        }
예제 #2
0
        public TextInputWidget(Game game, Font font, Font boldFont) : base(game)
        {
            HorizontalAnchor = Anchor.LeftOrTop;
            VerticalAnchor   = Anchor.BottomOrRight;
            typingLogPos     = game.Chat.InputLog.Count;         // Index of newest entry + 1.

            chatInputText = new WrappableStringBuffer(len);
            DrawTextArgs args    = new DrawTextArgs("A", boldFont, true);
            Size         defSize = game.Drawer2D.MeasureChatSize(ref args);

            defaultWidth = defSize.Width; defaultHeight = defSize.Height;
            Width        = defaultWidth; Height = defaultHeight;

            args     = new DrawTextArgs("_", boldFont, true);
            caretTex = game.Drawer2D.MakeChatTextTexture(ref args, 0, 0);

            this.font = font;
            altText   = new AltTextInputWidget(game, font, this);
            altText.Init();
        }
예제 #3
0
        public TextInputWidget( Game game, Font font, Font boldFont )
            : base(game)
        {
            HorizontalAnchor = Anchor.LeftOrTop;
            VerticalAnchor = Anchor.BottomOrRight;
            typingLogPos = game.Chat.InputLog.Count; // Index of newest entry + 1.

            chatInputText = new WrappableStringBuffer( len );
            DrawTextArgs args = new DrawTextArgs( "A", boldFont, true );
            Size defSize = game.Drawer2D.MeasureChatSize( ref args );
            defaultWidth = defSize.Width; defaultHeight = defSize.Height;
            Width = defaultWidth; Height = defaultHeight;

            args = new DrawTextArgs( "_", boldFont, true );
            caretTex = game.Drawer2D.MakeChatTextTexture( ref args, 0, 0 );

            this.font = font;
            this.boldFont = boldFont;
            altText = new AltTextInputWidget( game, font, boldFont, this );
            altText.Init();
        }