Make UI inputs more secure

This commit is contained in:
c0d3d3v 2022-07-11 18:52:51 +02:00
parent bc46465f55
commit 27a4c494e9
No known key found for this signature in database
GPG key ID: 068AF680530DFF31
2 changed files with 7 additions and 0 deletions

View file

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

View file

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