private void HandleEscape()
 {
     if (KeyDown("escape") || KeyDown("`"))
     {
         escapeAction.Activate();
         input = "";
     }
 }
Beispiel #2
0
 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;
     }
 }
Beispiel #5
0
    private void ToggleConsole()
    {
        Enabled = !Enabled;

        if (Enabled)
        {
            OpenAction.Activate();
        }
        else
        {
            CloseAction.Activate();
        }
    }
Beispiel #6
0
 /// <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 = "";
     }
 }
Beispiel #7
0
 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 = "";
     }
 }
Beispiel #8
0
    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 = "";
        }
    }