mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fixed mouse lock in the editor. Closes #1383
This commit is contained in:
parent
b5095427b2
commit
7f78915171
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue