fix sound not played in service menu if operator button is

pressed when attract sound is off
This commit is contained in:
Glenn Maynard
2007-05-03 05:48:01 +00:00
parent 688863f1aa
commit d481b5462b
2 changed files with 6 additions and 5 deletions
+1 -4
View File
@@ -27,6 +27,7 @@ ScreenAttract::ScreenAttract( bool bResetGameState )
void ScreenAttract::BeginScreen()
{
GAMESTATE->VisitAttractScreen( m_sName );
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
ScreenWithMenuElements::BeginScreen();
}
@@ -129,10 +130,6 @@ void ScreenAttract::HandleScreenMessage( const ScreenMessage SM )
if( bMusicChanging )
SOUND->StopMusic();
}
else if( SM == SM_GainFocus )
{
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
}
else if( SM == SM_LoseFocus )
{
ScreenAttract::SetAttractVolume( false );
+5 -1
View File
@@ -19,13 +19,13 @@ REGISTER_SCREEN_CLASS( ScreenDemonstration );
ScreenDemonstration::ScreenDemonstration()
{
m_bDemonstration = true;
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
}
void ScreenDemonstration::Init()
{
GAMESTATE->Reset();
GAMESTATE->VisitAttractScreen( m_sName );
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
// Choose a Style
{
@@ -80,6 +80,10 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM )
m_Out.StartTransitioning( SM_GoToNextScreen );
return;
}
else if( SM == SM_LoseFocus )
{
ScreenAttract::SetAttractVolume( false );
}
ScreenJukebox::HandleScreenMessage( SM );
}