mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix escape not working in settings menu anymore
The color picker was always consuming the escape hotkey even when already disabled. Regression from #6705 due to changed order of hotkey consumption.
This commit is contained in:
parent
3524a8f0d2
commit
6aa03c878e
|
@ -1072,15 +1072,16 @@ bool CMenus::CanDisplayWarning()
|
|||
|
||||
void CMenus::RenderColorPicker()
|
||||
{
|
||||
if(!ms_ColorPicker.m_Active)
|
||||
return;
|
||||
|
||||
if(UI()->ConsumeHotkey(CUI::HOTKEY_ESCAPE))
|
||||
{
|
||||
ms_ColorPicker.m_Active = false;
|
||||
ms_ValueSelectorTextMode = false;
|
||||
UI()->SetActiveItem(nullptr);
|
||||
}
|
||||
|
||||
if(!ms_ColorPicker.m_Active)
|
||||
return;
|
||||
}
|
||||
|
||||
// First check if we should disable color picker
|
||||
CUIRect PickerRect;
|
||||
|
|
Loading…
Reference in a new issue