per-screen RepeatRate, RepeatDelay

This commit is contained in:
Glenn Maynard
2007-03-16 06:00:06 +00:00
parent c99c634d96
commit 1faeb65a40
3 changed files with 17 additions and 0 deletions
+13
View File
@@ -33,6 +33,8 @@ bool Screen::SortMessagesByDelayRemaining( const Screen::QueuedScreenMessage &m1
void Screen::Init()
{
ALLOW_OPERATOR_MENU_BUTTON.Load( m_sName, "AllowOperatorMenuButton" );
REPEAT_RATE.Load( m_sName, "RepeatRate" );
REPEAT_DELAY.Load( m_sName, "RepeatDelay" );
SetFOV( 0 );
@@ -195,6 +197,17 @@ void Screen::HandleScreenMessage( const ScreenMessage SM )
else
SCREENMAN->SetNewScreen( SM == SM_GoToNextScreen? GetNextScreen():GetPrevScreen() );
}
else if( SM == SM_GainFocus )
{
if( REPEAT_RATE != -1.0f )
INPUTFILTER->SetRepeatRate( REPEAT_RATE );
if( REPEAT_DELAY != -1.0f )
INPUTFILTER->SetRepeatDelay( REPEAT_DELAY );
}
else if( SM == SM_LoseFocus )
{
INPUTFILTER->ResetRepeatRate();
}
}
RString Screen::GetNextScreen() const