Skip to content

Commit

Permalink
Hide the console window when the escape key is pressed
Browse files Browse the repository at this point in the history
yvt committed Jul 14, 2019
1 parent d6f5370 commit c6edd64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Resources/Scripts/Gui/Console/ConsoleUI.as
Original file line number Diff line number Diff line change
@@ -53,7 +53,13 @@ namespace spades {

void WheelEvent(float x, float y) { manager.WheelEvent(x, y); }

void KeyEvent(string key, bool down) { manager.KeyEvent(key, down); }
void KeyEvent(string key, bool down) {
if (key == "Escape") {
active = false;
return;
}
manager.KeyEvent(key, down);
}

void TextInputEvent(string text) { manager.TextInputEvent(text); }

0 comments on commit c6edd64

Please sign in to comment.