Add sanity check that Style and PlayMode are set before selecting song
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user