Browse Source

Fixed the Console

Fixed the console which was broken by a previous update.
Peter Robinson 3 years ago
parent
commit
4c63282122
2 changed files with 4 additions and 3 deletions
  1. 1 1
      editor/EditorConsole/EditorConsole.cs
  2. 3 2
      engine/source/gui/guiTextEditCtrl.cc

+ 1 - 1
editor/EditorConsole/EditorConsole.cs

@@ -31,7 +31,7 @@ function EditorConsole::create(%this)
 		Position="0 738";
 		Extent="1024 30";
 		minExtent="120 20";
-		AltCommand="EditorConsole.eval();";
+		ReturnCommand="EditorConsole.eval();";
 		MaxLength="255";
 		active = "1";
 	};

+ 3 - 2
engine/source/gui/guiTextEditCtrl.cc

@@ -1427,7 +1427,7 @@ bool GuiTextEditCtrl::handleKeyDownWithNoModifier(const GuiEvent& event)
         return tabNext();
 
     case KEY_ESCAPE:
-        if (isMethod(mEscapeCommand))
+        if (mEscapeCommand && mEscapeCommand[0])
         {
             Con::evaluate(mEscapeCommand);
             return true;
@@ -1575,7 +1575,8 @@ bool GuiTextEditCtrl::handleEnterKey()
         tabNext();
     }
 
-    if (isMethod(mReturnCommand))
+    
+    if (mReturnCommand && mReturnCommand[0])
     {
         Con::evaluate(mReturnCommand);
     }