1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Overhaul the input system

This allows us to map the keys which are not considered in
irrlicht's EKEY_CODE system, such as \, [, /, ] etc.
This commit is contained in:
Giuseppe Bilotta
2011-08-13 22:44:31 +02:00
parent 16aedc0ef6
commit 7e610aece5
8 changed files with 329 additions and 176 deletions

View File

@@ -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;