have ScreenWithMenuElements play and stop music (instead of ScreenOptions and ScreenSelect)

Add StopMusicOnBack metric
This commit is contained in:
Chris Danford
2005-03-13 04:25:43 +00:00
parent cea5074135
commit e992442fe0
6 changed files with 23 additions and 35 deletions
+1 -18
View File
@@ -26,8 +26,7 @@
REGISTER_SCREEN_CLASS( ScreenOptionsMaster );
ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
ScreenOptions( sClassName ),
PLAY_MUSIC( sClassName, "PlayMusic" )
ScreenOptions( sClassName )
{
LOG->Trace("ScreenOptionsMaster::ScreenOptionsMaster(%s)", m_sName.c_str() );
}
@@ -106,22 +105,6 @@ ScreenOptionsMaster::~ScreenOptionsMaster()
OptionRowHandlers.clear();
}
void ScreenOptionsMaster::Update( float fDelta )
{
if( m_bFirstUpdate )
{
/*
* Don't play sounds during the ctor, since derived classes havn't loaded yet.
* Leave the music alone (eg. ScreenPlayerOptions music sample
* left over from ScreenSelectMusic).
*/
if( PLAY_MUSIC )
SOUND->PlayMusic( THEME->GetPathS( m_sName, "music" ) );
}
ScreenOptions::Update( fDelta );
}
void ScreenOptionsMaster::ImportOptions( int r, PlayerNumber pn )
{
ASSERT( GAMESTATE->IsHumanPlayer(pn) );