fixed mouse lock in the editor. Closes #1383

This commit is contained in:
oy 2015-08-25 16:57:35 +02:00
parent b5095427b2
commit 7f78915171
2 changed files with 7 additions and 1 deletions

View file

@ -699,7 +699,7 @@ int CEditor::UiDoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, in
if(UI()->ActiveItem() == pID)
{
if(!UI()->MouseButton(0))
if(!UI()->MouseButton(0) || Input()->KeyDown(KEY_ESCAPE))
{
m_LockMouse = false;
UI()->SetActiveItem(0);

View file

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