obey m_fHibernateSecondsLeft, so a 3-second TipShowTime that
starts by delaying off-screen for 2.5 seconds can instead hibernate,2.5, to avoid showing the first tip for only .5 seconds
This commit is contained in:
@@ -54,12 +54,14 @@ void HelpDisplay::SetTips( const CStringArray &arrayTips, const CStringArray &ar
|
|||||||
|
|
||||||
void HelpDisplay::Update( float fDeltaTime )
|
void HelpDisplay::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
|
float fHibernate = m_fHibernateSecondsLeft;
|
||||||
|
|
||||||
BitmapText::Update( fDeltaTime );
|
BitmapText::Update( fDeltaTime );
|
||||||
|
|
||||||
if( m_arrayTips.empty() )
|
if( m_arrayTips.empty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_fSecsUntilSwitch -= fDeltaTime;
|
m_fSecsUntilSwitch -= max( fDeltaTime - fHibernate, 0 );
|
||||||
if( m_fSecsUntilSwitch > 0 )
|
if( m_fSecsUntilSwitch > 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user