diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index d32f7745f..1a1f6ffae 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -2393,6 +2393,8 @@ void CMenus::SetActive(bool Active) { ms_ColorPicker.m_Active = false; Input()->SetIMEState(Active); + UI()->SetHotItem(nullptr); + UI()->SetActiveItem(nullptr); } m_MenuActive = Active; if(!m_MenuActive) diff --git a/src/game/client/ui.cpp b/src/game/client/ui.cpp index 8e752e28e..ab094e97a 100644 --- a/src/game/client/ui.cpp +++ b/src/game/client/ui.cpp @@ -155,6 +155,11 @@ void CUI::Update(float MouseX, float MouseY, float MouseWorldX, float MouseWorld if(m_pActiveItem) m_pHotItem = m_pActiveItem; m_pBecomingHotItem = 0; + if(!Enabled()) + { + m_pHotItem = nullptr; + m_pActiveItem = nullptr; + } } bool CUI::MouseInside(const CUIRect *pRect) const