Change GUI-focus on TAB now after the active element got the TAB-key, so the element has a chance to prevent focus-changes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3757 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2011-05-26 19:02:31 +00:00
parent 1f1df157de
commit b5c52236f7
1 changed files with 6 additions and 6 deletions

View File

@ -575,7 +575,11 @@ bool CGUIEnvironment::postEventFromUser(const SEvent& event)
break;
case EET_KEY_INPUT_EVENT:
{
// send focus changing event
if (Focus && Focus->OnEvent(event))
return true;
// For keys we handle the event before changing focus to give elements the chance for catching the TAB
// Send focus changing event
if (event.EventType == EET_KEY_INPUT_EVENT &&
event.KeyInput.PressedDown &&
event.KeyInput.Key == KEY_TAB)
@ -587,11 +591,7 @@ bool CGUIEnvironment::postEventFromUser(const SEvent& event)
return true;
}
}
if (Focus)
{
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return Focus->OnEvent(event);
}
}
break;
default: