Fix mouse hang with editor popup, value selector and escape (fixes #290)

This commit is contained in:
def 2015-08-22 20:22:23 +02:00
parent 7ff9cd890c
commit b5aca60662

View file

@ -78,10 +78,18 @@ void CEditor::UiDoPopupMenu()
r.Margin(4.0f, &r);
if(s_UiPopups[i].m_pfnFunc(this, r))
{
m_LockMouse = false;
UI()->SetActiveItem(0);
g_UiNumPopups--;
}
if(Input()->KeyDown(KEY_ESCAPE))
{
m_LockMouse = false;
UI()->SetActiveItem(0);
g_UiNumPopups--;
}
}
}