1
0
Fork 0

Add a fix for inventory that can't be open in some cases

The forceUpdateHoveredElement() forces GUI Environment to drop previously
grabbed elements that are not hovered anymore.
merge-requests/1/head
Deve 2023-05-17 00:26:18 +02:00 committed by mckaygerhard
parent 1f26bfa168
commit fe35c3a31c
1 changed files with 10 additions and 0 deletions

View File

@ -109,7 +109,17 @@ void GUIModalMenu::quitMenu()
// This removes Environment's grab on us
Environment->removeFocus(this);
m_menumgr->deletingMenu(this);
this->grab();
this->remove();
#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 9
// Force update hovered elements, so that GUI Environment drops previously
// grabbed elements that are not hovered anymore
Environment->forceUpdateHoveredElement();
#endif
this->drop();
#ifdef HAVE_TOUCHSCREENGUI
if (g_touchscreengui && g_touchscreengui->isActive() && m_touchscreen_visible)
g_touchscreengui->show();