Add a prefix to irrlicht key codes

This commit is contained in:
Deve
2017-07-20 21:53:37 +02:00
parent 10909b9556
commit 0dba3c8f67
29 changed files with 1329 additions and 1314 deletions

View File

@@ -116,7 +116,8 @@ bool CGUIButton::OnEvent(const SEvent& event)
{
case EET_KEY_INPUT_EVENT:
if (event.KeyInput.PressedDown &&
(event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE))
(event.KeyInput.Key == IRR_KEY_RETURN ||
event.KeyInput.Key == IRR_KEY_SPACE))
{
if (!IsPushButton)
setPressed(true);
@@ -125,14 +126,16 @@ bool CGUIButton::OnEvent(const SEvent& event)
return true;
}
if (Pressed && !IsPushButton && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE)
if (Pressed && !IsPushButton && event.KeyInput.PressedDown &&
event.KeyInput.Key == IRR_KEY_ESCAPE)
{
setPressed(false);
return true;
}
else
if (!event.KeyInput.PressedDown && Pressed &&
(event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE))
(event.KeyInput.Key == IRR_KEY_RETURN ||
event.KeyInput.Key == IRR_KEY_SPACE))
{
if (!IsPushButton)