示例#1
0
 private void HandleEscape()
 {
     if (KeyDown("escape") || KeyDown("`"))
     {
         escapeAction.Activate();
         input = "";
     }
 }
示例#2
0
 private void HandleSubmit()
 {
     if (KeyDown("[enter]") || KeyDown("return"))
     {
         if (submitAction != null)
         {
             submitAction.Activate();
         }
         input = "";
     }
 }
示例#3
0
 private void ToggleConsole()
 {
     consoleEnabled = !consoleEnabled;
     if (consoleEnabled)
     {
         ConsoleOpenAction.Activate();
     }
     else
     {
         ConsoleCloseAction.Activate();
     }
 }
示例#4
0
 private void HandleSubmit()
 {
     if (KeyDown("[enter]") || KeyDown("return"))
     {
         if (submitAction != null)
         {
             submitAction.Activate();
         }
         input          = "";
         scrollPosition = consoleLog.log.Length;
     }
 }
示例#5
0
    private void ToggleConsole()
    {
        Enabled = !Enabled;

        if (Enabled)
        {
            OpenAction.Activate();
        }
        else
        {
            CloseAction.Activate();
        }
    }
示例#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 = "";
     }
 }
示例#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 = "";
     }
 }
示例#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 = "";
        }
    }