mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-31 18:43:02 +00:00
Fix button wrong state on fast clicking
This commit is contained in:
parent
92bd6a132e
commit
2f8a8d893f
@ -71,7 +71,6 @@ void Button::Init()
|
|||||||
_keyFocusBorder = NULL;
|
_keyFocusBorder = NULL;
|
||||||
m_bSelectionStateSaved = false;
|
m_bSelectionStateSaved = false;
|
||||||
m_bStaySelectedOnClick = false;
|
m_bStaySelectedOnClick = false;
|
||||||
m_bStaySelectedOnClick = false;
|
|
||||||
m_bStayArmedOnClick = false;
|
m_bStayArmedOnClick = false;
|
||||||
m_sArmedSoundName = UTL_INVAL_SYMBOL;
|
m_sArmedSoundName = UTL_INVAL_SYMBOL;
|
||||||
m_sDepressedSoundName = UTL_INVAL_SYMBOL;
|
m_sDepressedSoundName = UTL_INVAL_SYMBOL;
|
||||||
@ -140,11 +139,12 @@ void Button::SetSelected( bool state )
|
|||||||
InvalidateLayout(false);
|
InvalidateLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !m_bStayArmedOnClick && state && _buttonFlags.IsFlagSet( ARMED ) )
|
// Jusic: idk what is it for
|
||||||
{
|
//if (!m_bStayArmedOnClick && state && _buttonFlags.IsFlagSet(ARMED))
|
||||||
_buttonFlags.SetFlag( ARMED, false );
|
//{
|
||||||
InvalidateLayout(false);
|
// _buttonFlags.SetFlag( ARMED, false );
|
||||||
}
|
// InvalidateLayout(false);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Button::SetBlink( bool state )
|
void Button::SetBlink( bool state )
|
||||||
@ -877,7 +877,11 @@ void Button::ApplySettings( KeyValues *inResourceData )
|
|||||||
SetReleasedSound(sound);
|
SetReleasedSound(sound);
|
||||||
}
|
}
|
||||||
|
|
||||||
_activationType = (ActivationType_t)inResourceData->GetInt( "button_activation_type", ACTIVATE_ONRELEASED );
|
int iButtonActivationType = inResourceData->GetInt( "button_activation_type", -1 );
|
||||||
|
if (iButtonActivationType != -1)
|
||||||
|
{
|
||||||
|
_activationType = (ActivationType_t)iButtonActivationType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user