示例#1
0
        void SetInitialMessages()
        {
            Chat chat = game.Chat;

            chatIndex = chat.Log.Count - chatLines;
            ResetChat();
            status.SetText(2, chat.Status1.Text);
            status.SetText(3, chat.Status2.Text);
            status.SetText(4, chat.Status3.Text);
            if (game.ShowClock)
            {
                status.SetText(0, chat.ClientClock.Text);
            }

            bottomRight.SetText(2, chat.BottomRight1.Text);
            bottomRight.SetText(1, chat.BottomRight2.Text);
            bottomRight.SetText(0, chat.BottomRight3.Text);
            announcement.SetText(chat.Announcement.Text);
            for (int i = 0; i < chat.ClientStatus.Length; i++)
            {
                clientStatus.SetText(i, chat.ClientStatus[i].Text);
            }

            if (game.chatInInputBuffer != null)
            {
                OpenTextInputBar(game.chatInInputBuffer);
                game.chatInInputBuffer = null;
            }
        }
 public static new ChatTextWidget Create( Game game, int x, int y, string text, Anchor horizontal, Anchor vertical, Font font )
 {
     ChatTextWidget widget = new ChatTextWidget( game, font );
     widget.Init();
     widget.HorizontalAnchor = horizontal; widget.VerticalAnchor = vertical;
     widget.XOffset = x; widget.YOffset = y;
     widget.SetText( text );
     return widget;
 }
        public static new ChatTextWidget Create(Game game, int x, int y, string text, Anchor horizontal, Anchor vertical, Font font)
        {
            ChatTextWidget widget = new ChatTextWidget(game, font);

            widget.Init();
            widget.HorizontalAnchor = horizontal; widget.VerticalAnchor = vertical;
            widget.XOffset          = x; widget.YOffset = y;
            widget.SetText(text);
            return(widget);
        }