allow attract screens to ignore SoundVolumeAttract

This commit is contained in:
Glenn Maynard
2007-06-11 16:17:23 +00:00
parent f6b8d67f5f
commit 797d0d57cf
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -2689,6 +2689,7 @@ StartScreen=ScreenTitleBranch()
Fallback="ScreenWithMenuElementsBlank"
BackGoesToStartScreen=true
PrevScreen=
AttractVolume=true
[ScreenWithMenuElementsBlank]
Fallback="ScreenWithMenuElements"
+3 -1
View File
@@ -21,6 +21,7 @@ REGISTER_SCREEN_CLASS( ScreenAttract );
void ScreenAttract::Init()
{
RESET_GAME_STATE.Load( m_sName, "ResetGameState" );
ATTRACT_VOLUME.Load( m_sName, "AttractVolume" );
ScreenWithMenuElements::Init();
}
@@ -30,7 +31,7 @@ void ScreenAttract::BeginScreen()
GAMESTATE->Reset();
GAMESTATE->VisitAttractScreen( m_sName );
ScreenAttract::SetAttractVolume( true );
ScreenAttract::SetAttractVolume( ATTRACT_VOLUME );
ScreenWithMenuElements::BeginScreen();
}
@@ -46,6 +47,7 @@ void ScreenAttract::Input( const InputEventPlus &input )
void ScreenAttract::SetAttractVolume( bool bInAttract )
{
LOG->Trace( "SetAttractVolume %i", bInAttract );
if( bInAttract )
{
if( GAMESTATE->IsTimeToPlayAttractSounds() )
+1
View File
@@ -30,6 +30,7 @@ public:
protected:
virtual void StartPlayingMusic();
ThemeMetric<bool> RESET_GAME_STATE;
ThemeMetric<bool> ATTRACT_VOLUME;
};