From bd5ca951a75a04877c5aed3538e442822fee1608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 26 May 2024 15:20:48 +0200 Subject: [PATCH] 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. --- src/game/client/components/menus.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 182ce2fa9..3a9b86510 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -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)) {