allow attract screens to ignore SoundVolumeAttract
This commit is contained in:
@@ -2689,6 +2689,7 @@ StartScreen=ScreenTitleBranch()
|
|||||||
Fallback="ScreenWithMenuElementsBlank"
|
Fallback="ScreenWithMenuElementsBlank"
|
||||||
BackGoesToStartScreen=true
|
BackGoesToStartScreen=true
|
||||||
PrevScreen=
|
PrevScreen=
|
||||||
|
AttractVolume=true
|
||||||
|
|
||||||
[ScreenWithMenuElementsBlank]
|
[ScreenWithMenuElementsBlank]
|
||||||
Fallback="ScreenWithMenuElements"
|
Fallback="ScreenWithMenuElements"
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ REGISTER_SCREEN_CLASS( ScreenAttract );
|
|||||||
void ScreenAttract::Init()
|
void ScreenAttract::Init()
|
||||||
{
|
{
|
||||||
RESET_GAME_STATE.Load( m_sName, "ResetGameState" );
|
RESET_GAME_STATE.Load( m_sName, "ResetGameState" );
|
||||||
|
ATTRACT_VOLUME.Load( m_sName, "AttractVolume" );
|
||||||
ScreenWithMenuElements::Init();
|
ScreenWithMenuElements::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ void ScreenAttract::BeginScreen()
|
|||||||
GAMESTATE->Reset();
|
GAMESTATE->Reset();
|
||||||
|
|
||||||
GAMESTATE->VisitAttractScreen( m_sName );
|
GAMESTATE->VisitAttractScreen( m_sName );
|
||||||
ScreenAttract::SetAttractVolume( true );
|
ScreenAttract::SetAttractVolume( ATTRACT_VOLUME );
|
||||||
|
|
||||||
ScreenWithMenuElements::BeginScreen();
|
ScreenWithMenuElements::BeginScreen();
|
||||||
}
|
}
|
||||||
@@ -46,6 +47,7 @@ void ScreenAttract::Input( const InputEventPlus &input )
|
|||||||
|
|
||||||
void ScreenAttract::SetAttractVolume( bool bInAttract )
|
void ScreenAttract::SetAttractVolume( bool bInAttract )
|
||||||
{
|
{
|
||||||
|
LOG->Trace( "SetAttractVolume %i", bInAttract );
|
||||||
if( bInAttract )
|
if( bInAttract )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsTimeToPlayAttractSounds() )
|
if( GAMESTATE->IsTimeToPlayAttractSounds() )
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void StartPlayingMusic();
|
virtual void StartPlayingMusic();
|
||||||
ThemeMetric<bool> RESET_GAME_STATE;
|
ThemeMetric<bool> RESET_GAME_STATE;
|
||||||
|
ThemeMetric<bool> ATTRACT_VOLUME;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user