mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed so clicking 3 times doesn't generate 2 double-clicks
This commit is contained in:
parent
4123f28bba
commit
25be8b1be3
|
@ -87,7 +87,13 @@ void CInput::MouseModeRelative()
|
|||
|
||||
int CInput::MouseDoubleClick()
|
||||
{
|
||||
return m_ReleaseDelta < (time_freq() >> 2);
|
||||
if(m_ReleaseDelta >= 0 && m_ReleaseDelta < (time_freq() >> 2))
|
||||
{
|
||||
m_LastRelease = 0;
|
||||
m_ReleaseDelta = -1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CInput::ClearKeyStates()
|
||||
|
|
|
@ -342,6 +342,7 @@ CMenus::CListboxItem CMenus::UiDoListboxNextItem(void *pId, bool Selected)
|
|||
if(m_EnterPressed || (Input()->MouseDoubleClick() && UI()->ActiveItem() == pId))
|
||||
{
|
||||
gs_ListBoxItemActivated = true;
|
||||
UI()->SetActiveItem(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue