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.
This commit is contained in:
parent
cd784ebf81
commit
9c6495b695
@ -109,7 +109,17 @@ void GUIModalMenu::quitMenu()
|
|||||||
// This removes Environment's grab on us
|
// This removes Environment's grab on us
|
||||||
Environment->removeFocus(this);
|
Environment->removeFocus(this);
|
||||||
m_menumgr->deletingMenu(this);
|
m_menumgr->deletingMenu(this);
|
||||||
|
this->grab();
|
||||||
this->remove();
|
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
|
#ifdef HAVE_TOUCHSCREENGUI
|
||||||
if (g_touchscreengui && g_touchscreengui->isActive() && m_touchscreen_visible)
|
if (g_touchscreengui && g_touchscreengui->isActive() && m_touchscreen_visible)
|
||||||
g_touchscreengui->show();
|
g_touchscreengui->show();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user