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-e03cc46cb475master
parent
1f1df157de
commit
b5c52236f7
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue