mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
16aedc0ef6
commit
7e610aece5
8 changed files with 329 additions and 176 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue