mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Make UI inputs more secure
This commit is contained in:
parent
bc46465f55
commit
27a4c494e9
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue