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; } }
void MakeExtendedHelp(string[] desc) { extendedHelp = new TextGroupWidget(game, desc.Length, regularFont, null) .SetLocation(Anchor.LeftOrTop, Anchor.LeftOrTop, 0, 0); extendedHelp.Init(); for (int i = 0; i < desc.Length; i++) { extendedHelp.SetText(i, desc[i]); } extendedHelp.XOffset = game.Width / 2 - extendedHelp.Width / 2; extendedHelp.YOffset = game.Height / 2 + extHelpY; extendedHelp.CalculatePosition(); }
void Recreate(TextGroupWidget group, char code) { for (int i = 0; i < group.lines.Length; i++) { string line = group.lines[i]; if (line == null) { continue; } for (int j = 0; j < line.Length - 1; j++) { if (line[j] == '&' && line[j + 1] == code) { group.SetText(i, line); break; } } } }
void MakeExtendedHelp(string[] desc) { extendedHelp = new TextGroupWidget(game, desc.Length, extendedHelpFont, null, Anchor.Centre, Anchor.Centre); extendedHelp.Init(); for (int i = 0; i < desc.Length; i++) { extendedHelp.SetText(i, desc[i]); } for (int i = 0; i < desc.Length; i++) { extendedHelp.Textures[i].X1 = extendedHelp.X; } tableWidth = extendedHelp.Width; tableHeight = extendedHelp.Height; extendedHelp.MoveTo(extendedHelp.X, extHelpY + tableHeight / 2); }
void SelectExtendedHelp(int idx) { DisposeExtendedHelp(); if (descriptions == null || input != null) { return; } string[] desc = descriptions[idx]; if (desc == null) { return; } extHelp = new TextGroupWidget(game, desc.Length, textFont, null) .SetLocation(Anchor.Min, Anchor.Min, 0, 0); extHelp.Init(); for (int i = 0; i < desc.Length; i++) { extHelp.SetText(i, desc[i]); } RepositionExtendedHelp(); }