summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-13 18:16:49 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-22 13:02:08 +0200
commit53eedd3ba4029d7f4154477c3492748bb4f6e4e5 (patch)
treeae00497ecdbc01cd3494e045070b273e163a2dd0 /src/game.cpp
parent42134bb49eaa5116838a2c188c432c8b9420dff8 (diff)
downloadminetest-53eedd3ba4029d7f4154477c3492748bb4f6e4e5.tar.gz
minetest-53eedd3ba4029d7f4154477c3492748bb4f6e4e5.tar.bz2
minetest-53eedd3ba4029d7f4154477c3492748bb4f6e4e5.zip
Introduce hotkey for calling up a command window
This is just a chat window with the / text pre-loaded.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 22fab706c..dd1e58b4b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1320,6 +1320,14 @@ void the_game(
&g_menumgr, dest,
L""))->drop();
}
+ else if(input->wasKeyDown(getKeySetting("keymap_cmd")))
+ {
+ TextDest *dest = new TextDestChat(&client);
+
+ (new GUITextInputMenu(guienv, guiroot, -1,
+ &g_menumgr, dest,
+ L"/"))->drop();
+ }
else if(input->wasKeyDown(getKeySetting("keymap_freemove")))
{
if(g_settings.getBool("free_move"))