Prevent UI elements from being hovered while key reader is active

Since the key reader will intercept the next input, the other UI elements should not react to the hovered mouse.
This commit is contained in:
Robert Müller 2024-05-26 15:20:48 +02:00
parent 5ad62b5732
commit bd5ca951a7

View file

@ -1172,6 +1172,12 @@ void CMenus::Render()
Ui()->RenderPopupMenus();
// Prevent UI elements from being hovered while a key reader is active
if(m_Binder.m_TakeKey)
{
Ui()->SetHotItem(nullptr);
}
// Handle this escape hotkey after popup menus
if(!m_ShowStart && ClientState == IClient::STATE_OFFLINE && Ui()->ConsumeHotkey(CUi::HOTKEY_ESCAPE))
{