fixed so clicking 3 times doesn't generate 2 double-clicks

This commit is contained in:
Choupom 2010-09-03 19:39:20 +02:00 committed by oy
parent 4123f28bba
commit 25be8b1be3
2 changed files with 8 additions and 1 deletions

View file

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

View file

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