From 7e610aece52ad547d4ae263aff5297342d5a4bff Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 13 Aug 2011 22:44:31 +0200 Subject: Overhaul the input system This allows us to map the keys which are not considered in irrlicht's EKEY_CODE system, such as \, [, /, ] etc. --- src/guiInventoryMenu.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/guiInventoryMenu.cpp') 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; -- cgit v1.2.3