private void HandleEscape() { if (KeyDown("escape") || KeyDown("`")) { escapeAction.Activate(); input = ""; } }
private void HandleSubmit() { if (KeyDown("[enter]") || KeyDown("return")) { if (submitAction != null) { submitAction.Activate(); } input = ""; } }
private void ToggleConsole() { consoleEnabled = !consoleEnabled; if (consoleEnabled) { ConsoleOpenAction.Activate(); } else { ConsoleCloseAction.Activate(); } }
private void HandleSubmit() { if (KeyDown("[enter]") || KeyDown("return")) { if (submitAction != null) { submitAction.Activate(); } input = ""; scrollPosition = consoleLog.log.Length; } }
private void ToggleConsole() { Enabled = !Enabled; if (Enabled) { OpenAction.Activate(); } else { CloseAction.Activate(); } }
/// <summary> /// Handles a command submit /// </summary> private void HandleSubmit() { if (KeyDown("[enter]") || KeyDown("return")) { consoleHistoryPosition = -1; if (submitAction != null) { submitAction.Activate(); consoleHistoryCommands.Insert(0, input); if (consoleHistoryCommands.Count > maxConsoleHistorySize) { consoleHistoryCommands.RemoveAt(consoleHistoryCommands.Count - 1); } } input = ""; } }
private void HandleSubmit() { if (KeyDown("[enter]") || KeyDown("return")) { consoleHistoryPosition = -1; // up arrow or down arrow will set it to 0, which is the last command typed. if (submitAction != null) { submitAction.Activate(); consoleHistoryCommands.Insert(0, input); if (consoleHistoryCommands.Count > maxConsoleHistorySize) { consoleHistoryCommands.RemoveAt(consoleHistoryCommands.Count - 1); } } input = ""; } }
private void HandleSubmit() { if (KeyDown("[enter]") || KeyDown("return")) { // Up arrow or down arrow will set it to 0, which is the last command typed. HistoryPosition = -1; if (SubmitAction != null) { SubmitAction.Activate(); HistoryCommands.Insert(0, CurrentInput); if (HistoryCommands.Count > MaxHistorySize) { HistoryCommands.RemoveAt(HistoryCommands.Count - 1); } } CurrentInput = ""; } }