public static void Update(GameMain game, float deltaTime) { lock (queuedMessages) { while (queuedMessages.Count > 0) { var newMsg = queuedMessages.Dequeue(); AddMessage(newMsg); if (GameSettings.SaveDebugConsoleLogs) { unsavedMessages.Add(newMsg); if (unsavedMessages.Count >= messagesPerFile) { SaveLogs(); unsavedMessages.Clear(); } } } } activeQuestionText?.SetAsLastChild(); if (PlayerInput.KeyHit(Keys.F3)) { isOpen = !isOpen; if (isOpen) { textBox.Select(); AddToGUIUpdateList(); } else { GUI.ForceMouseOn(null); textBox.Deselect(); } } if (isOpen) { frame.UpdateManually(deltaTime); Character.DisableControls = true; if (PlayerInput.KeyHit(Keys.Up)) { textBox.Text = SelectMessage(-1, textBox.Text); } else if (PlayerInput.KeyHit(Keys.Down)) { textBox.Text = SelectMessage(1, textBox.Text); } else if (PlayerInput.KeyHit(Keys.Tab)) { textBox.Text = AutoComplete(textBox.Text); } if (PlayerInput.KeyHit(Keys.Enter)) { ExecuteCommand(textBox.Text); textBox.Text = ""; } } }