[ScreenSelectMusic] Added IdleCommentSeconds metric and "ScreenSelectMusic IdleComment" announcer sound.
This commit is contained in:
@@ -1881,6 +1881,7 @@ Codes=""
|
|||||||
TimerSeconds=60
|
TimerSeconds=60
|
||||||
DoRouletteOnMenuTimer=true
|
DoRouletteOnMenuTimer=true
|
||||||
RouletteTimerSeconds=15
|
RouletteTimerSeconds=15
|
||||||
|
IdleCommentSeconds=20
|
||||||
#
|
#
|
||||||
DefaultSort=GAMESTATE:IsCourseMode() and "Group" or "AllCourses"
|
DefaultSort=GAMESTATE:IsCourseMode() and "Group" or "AllCourses"
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ void ScreenSelectMusic::Init()
|
|||||||
GAMESTATE->SetMasterPlayerNumber(PLAYER_1);
|
GAMESTATE->SetMasterPlayerNumber(PLAYER_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IDLE_COMMENT_SECONDS.Load( m_sName, "IdleCommentSeconds" );
|
||||||
SAMPLE_MUSIC_DELAY_INIT.Load( m_sName, "SampleMusicDelayInit" );
|
SAMPLE_MUSIC_DELAY_INIT.Load( m_sName, "SampleMusicDelayInit" );
|
||||||
SAMPLE_MUSIC_DELAY.Load( m_sName, "SampleMusicDelay" );
|
SAMPLE_MUSIC_DELAY.Load( m_sName, "SampleMusicDelay" );
|
||||||
SAMPLE_MUSIC_LOOPS.Load( m_sName, "SampleMusicLoops" );
|
SAMPLE_MUSIC_LOOPS.Load( m_sName, "SampleMusicLoops" );
|
||||||
@@ -226,6 +227,7 @@ void ScreenSelectMusic::Init()
|
|||||||
void ScreenSelectMusic::BeginScreen()
|
void ScreenSelectMusic::BeginScreen()
|
||||||
{
|
{
|
||||||
g_ScreenStartedLoadingAt.Touch();
|
g_ScreenStartedLoadingAt.Touch();
|
||||||
|
m_timerIdleComment.GetDeltaTime();
|
||||||
|
|
||||||
if( CommonMetrics::AUTO_SET_STYLE )
|
if( CommonMetrics::AUTO_SET_STYLE )
|
||||||
{
|
{
|
||||||
@@ -376,6 +378,15 @@ void ScreenSelectMusic::CheckBackgroundRequests( bool bForce )
|
|||||||
|
|
||||||
void ScreenSelectMusic::Update( float fDeltaTime )
|
void ScreenSelectMusic::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
|
if( !IsTransitioning() )
|
||||||
|
{
|
||||||
|
if( IDLE_COMMENT_SECONDS > 0 && m_timerIdleComment.PeekDeltaTime() >= IDLE_COMMENT_SECONDS )
|
||||||
|
{
|
||||||
|
SOUND->PlayOnceFromAnnouncer( m_sName+" IdleComment" );
|
||||||
|
m_timerIdleComment.GetDeltaTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScreenWithMenuElements::Update( fDeltaTime );
|
ScreenWithMenuElements::Update( fDeltaTime );
|
||||||
|
|
||||||
CheckBackgroundRequests( false );
|
CheckBackgroundRequests( false );
|
||||||
@@ -384,6 +395,9 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
// LOG->Trace( "ScreenSelectMusic::Input()" );
|
// LOG->Trace( "ScreenSelectMusic::Input()" );
|
||||||
|
|
||||||
|
// reset announcer timer
|
||||||
|
m_timerIdleComment.GetDeltaTime();
|
||||||
|
|
||||||
// debugging?
|
// debugging?
|
||||||
// I just like being able to see untransliterated titles occasionally.
|
// I just like being able to see untransliterated titles occasionally.
|
||||||
if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_F9 )
|
if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_F9 )
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ protected:
|
|||||||
vector<Trail*> m_vpTrails;
|
vector<Trail*> m_vpTrails;
|
||||||
int m_iSelection[NUM_PLAYERS];
|
int m_iSelection[NUM_PLAYERS];
|
||||||
|
|
||||||
|
RageTimer m_timerIdleComment;
|
||||||
|
ThemeMetric<float> IDLE_COMMENT_SECONDS;
|
||||||
|
|
||||||
ThemeMetric<float> SAMPLE_MUSIC_DELAY_INIT;
|
ThemeMetric<float> SAMPLE_MUSIC_DELAY_INIT;
|
||||||
ThemeMetric<float> SAMPLE_MUSIC_DELAY;
|
ThemeMetric<float> SAMPLE_MUSIC_DELAY;
|
||||||
ThemeMetric<bool> SAMPLE_MUSIC_LOOPS;
|
ThemeMetric<bool> SAMPLE_MUSIC_LOOPS;
|
||||||
|
|||||||
Reference in New Issue
Block a user