Add a prefix to irrlicht key codes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user