[ScreenSelectMusic] Added IdleCommentSeconds metric and "ScreenSelectMusic IdleComment" announcer sound.

This commit is contained in:
AJ Kelly
2011-08-07 19:09:33 -05:00
parent 9c16ca4ef9
commit 5238a51770
3 changed files with 18 additions and 0 deletions
+14
View File
@@ -71,6 +71,7 @@ void ScreenSelectMusic::Init()
GAMESTATE->SetMasterPlayerNumber(PLAYER_1);
}
IDLE_COMMENT_SECONDS.Load( m_sName, "IdleCommentSeconds" );
SAMPLE_MUSIC_DELAY_INIT.Load( m_sName, "SampleMusicDelayInit" );
SAMPLE_MUSIC_DELAY.Load( m_sName, "SampleMusicDelay" );
SAMPLE_MUSIC_LOOPS.Load( m_sName, "SampleMusicLoops" );
@@ -226,6 +227,7 @@ void ScreenSelectMusic::Init()
void ScreenSelectMusic::BeginScreen()
{
g_ScreenStartedLoadingAt.Touch();
m_timerIdleComment.GetDeltaTime();
if( CommonMetrics::AUTO_SET_STYLE )
{
@@ -376,6 +378,15 @@ void ScreenSelectMusic::CheckBackgroundRequests( bool bForce )
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 );
CheckBackgroundRequests( false );
@@ -384,6 +395,9 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
{
// LOG->Trace( "ScreenSelectMusic::Input()" );
// reset announcer timer
m_timerIdleComment.GetDeltaTime();
// debugging?
// I just like being able to see untransliterated titles occasionally.
if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_F9 )