implement OptionRowHandlerListSteps::Reload
This commit is contained in:
@@ -285,6 +285,17 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
|||||||
m_Def.m_sName = "Steps";
|
m_Def.m_sName = "Steps";
|
||||||
m_Def.m_bAllowThemeItems = false; // we theme the text ourself
|
m_Def.m_bAllowThemeItems = false; // we theme the text ourself
|
||||||
|
|
||||||
|
Reload();
|
||||||
|
|
||||||
|
// don't call default
|
||||||
|
// OptionRowHandlerList::LoadInternal( cmds );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool Reload()
|
||||||
|
{
|
||||||
|
m_Def.m_vsChoices.clear();
|
||||||
|
m_aListEntries.clear();
|
||||||
|
|
||||||
// fill in difficulty names
|
// fill in difficulty names
|
||||||
if( GAMESTATE->IsEditing() )
|
if( GAMESTATE->IsEditing() )
|
||||||
{
|
{
|
||||||
@@ -309,7 +320,7 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
|||||||
m_aListEntries.push_back( mc );
|
m_aListEntries.push_back( mc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // !GAMESTATE->IsCourseMode(), playing a song
|
else if( GAMESTATE->m_pCurSong ) // playing a song
|
||||||
{
|
{
|
||||||
vector<Steps*> vpSteps;
|
vector<Steps*> vpSteps;
|
||||||
Song *pSong = GAMESTATE->m_pCurSong;
|
Song *pSong = GAMESTATE->m_pCurSong;
|
||||||
@@ -333,9 +344,15 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
|||||||
m_aListEntries.push_back( mc );
|
m_aListEntries.push_back( mc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We have neither a song nor a course. We may be preloading the screen
|
||||||
|
* for future use. */
|
||||||
|
m_Def.m_vsChoices.push_back( "n/a" );
|
||||||
|
m_aListEntries.push_back( GameCommand() );
|
||||||
|
}
|
||||||
|
|
||||||
// don't call default
|
return true;
|
||||||
// OptionRowHandlerList::LoadInternal( cmds );
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user