mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 17:44: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()
|
void CMenus::RenderColorPicker()
|
||||||
{
|
{
|
||||||
|
if(!ms_ColorPicker.m_Active)
|
||||||
|
return;
|
||||||
|
|
||||||
if(UI()->ConsumeHotkey(CUI::HOTKEY_ESCAPE))
|
if(UI()->ConsumeHotkey(CUI::HOTKEY_ESCAPE))
|
||||||
{
|
{
|
||||||
ms_ColorPicker.m_Active = false;
|
ms_ColorPicker.m_Active = false;
|
||||||
ms_ValueSelectorTextMode = false;
|
ms_ValueSelectorTextMode = false;
|
||||||
UI()->SetActiveItem(nullptr);
|
UI()->SetActiveItem(nullptr);
|
||||||
}
|
|
||||||
|
|
||||||
if(!ms_ColorPicker.m_Active)
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// First check if we should disable color picker
|
// First check if we should disable color picker
|
||||||
CUIRect PickerRect;
|
CUIRect PickerRect;
|
||||||
|
|
Loading…
Reference in a new issue