Add sanity check that Style and PlayMode are set before selecting song

This commit is contained in:
Chris Danford
2003-03-16 07:29:58 +00:00
parent 8b7894be76
commit 922feeb105
+8 -3
View File
@@ -88,6 +88,14 @@ ScreenSelectMusic::ScreenSelectMusic()
{
LOG->Trace( "ScreenSelectMusic::ScreenSelectMusic()" );
if( GAMESTATE->m_CurStyle == STYLE_INVALID )
RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." );
if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID )
RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before loading ScreenSelectMusic." );
CodeDetector::RefreshCacheItems();
GAMESTATE->m_SongOptions.m_FailType = PREFSMAN->m_DefaultFailType;
@@ -142,9 +150,6 @@ ScreenSelectMusic::ScreenSelectMusic()
m_GrooveRadar.SetXY( RADAR_X, RADAR_Y );
this->AddChild( &m_GrooveRadar );
// m_OptionIcons.SetXY( OPTION_ICONS_X, OPTION_ICONS_Y );
// this->AddChild( &m_OptionIcons );
m_textSongOptions.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y );