Make sure that we don't use screen widget when dialog window is opened.

It fixes #3639
This commit is contained in:
Deve 2018-12-03 22:02:20 +01:00
parent 68a837607e
commit a85746ca83

View File

@ -397,6 +397,19 @@ void EventHandler::deallocate()
void EventHandler::sendNavigationEvent(const NavigationDirection nav, const int playerID)
{
Widget* w = GUIEngine::getFocusForPlayer(playerID);
if (ScreenKeyboard::isActive() &&
!ScreenKeyboard::getCurrent()->isMyIrrChild(w->getIrrlichtElement()))
{
w = NULL;
}
if (ModalDialog::isADialogActive() &&
!ModalDialog::getCurrent()->isMyIrrChild(w->getIrrlichtElement()))
{
w = NULL;
}
if (w == NULL)
{
Widget* defaultWidget = NULL;