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
+2
View File
@@ -28,6 +28,8 @@ MinScoreToMaintainCombo="TapNoteScore_W3"
ScreenInitCommand=
ScreenOnCommand=
AllowOperatorMenuButton=true
RepeatRate=-1
RepeatDelay=-1
PrepareScreens=
PersistScreens=
GroupedScreens=
+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
+2
View File
@@ -72,6 +72,8 @@ protected:
static bool SortMessagesByDelayRemaining(const QueuedScreenMessage &m1, const QueuedScreenMessage &m2);
ThemeMetric<bool> ALLOW_OPERATOR_MENU_BUTTON;
ThemeMetric<float> REPEAT_RATE;
ThemeMetric<float> REPEAT_DELAY;
// If left blank, the NextScreen metric will be used.
RString m_sNextScreen;