allow attract screens to ignore SoundVolumeAttract
This commit is contained in:
@@ -2689,6 +2689,7 @@ StartScreen=ScreenTitleBranch()
|
||||
Fallback="ScreenWithMenuElementsBlank"
|
||||
BackGoesToStartScreen=true
|
||||
PrevScreen=
|
||||
AttractVolume=true
|
||||
|
||||
[ScreenWithMenuElementsBlank]
|
||||
Fallback="ScreenWithMenuElements"
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
protected:
|
||||
virtual void StartPlayingMusic();
|
||||
ThemeMetric<bool> RESET_GAME_STATE;
|
||||
ThemeMetric<bool> ATTRACT_VOLUME;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user