summaryrefslogtreecommitdiff
path: root/src/guiInventoryMenu.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-08-22 14:46:52 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-08-22 14:46:52 +0300
commit836e43db60ff1f3c9d160d0d58ba5a631c4293fc (patch)
tree89096c3ffd4128694542ebdbfabe94b6a618e16d /src/guiInventoryMenu.cpp
parent6596e585fe844ce87a957bb7deaf2bf92d828592 (diff)
parent7e610aece52ad547d4ae263aff5297342d5a4bff (diff)
downloadminetest-836e43db60ff1f3c9d160d0d58ba5a631c4293fc.tar.gz
minetest-836e43db60ff1f3c9d160d0d58ba5a631c4293fc.tar.bz2
minetest-836e43db60ff1f3c9d160d0d58ba5a631c4293fc.zip
Merge remote-tracking branch 'oblomov/new_input'
Diffstat (limited to 'src/guiInventoryMenu.cpp')
-rw-r--r--src/guiInventoryMenu.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/guiInventoryMenu.cpp b/src/guiInventoryMenu.cpp
index 786a4dd22..f90a2e959 100644
--- a/src/guiInventoryMenu.cpp
+++ b/src/guiInventoryMenu.cpp
@@ -290,12 +290,9 @@ bool GUIInventoryMenu::OnEvent(const SEvent& event)
{
if(event.EventType==EET_KEY_INPUT_EVENT)
{
- if(event.KeyInput.Key==KEY_ESCAPE && event.KeyInput.PressedDown)
- {
- quitMenu();
- return true;
- }
- if(event.KeyInput.Key==getKeySetting("keymap_inventory") && event.KeyInput.PressedDown)
+ KeyPress kp(event.KeyInput);
+ if (event.KeyInput.PressedDown && (kp == EscapeKey ||
+ kp == getKeySetting("keymap_inventory")))
{
quitMenu();
return true;