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:
Robert Müller 2023-06-05 16:56:07 +02:00
parent 3524a8f0d2
commit 6aa03c878e

View file

@ -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;