per-screen RepeatRate, RepeatDelay
This commit is contained in:
@@ -28,6 +28,8 @@ MinScoreToMaintainCombo="TapNoteScore_W3"
|
||||
ScreenInitCommand=
|
||||
ScreenOnCommand=
|
||||
AllowOperatorMenuButton=true
|
||||
RepeatRate=-1
|
||||
RepeatDelay=-1
|
||||
PrepareScreens=
|
||||
PersistScreens=
|
||||
GroupedScreens=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user