diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index e0dc6bcd7..5a97b7963 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -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); diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index 7b33db1a8..89da5f0be 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -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); + } } }