Add StepsTypeInfo and return the structure rather than having GameManager methods for each piece of data

This commit is contained in:
Chris Danford
2008-03-24 04:39:24 +00:00
parent 36c553b0a3
commit 077a1a3b85
18 changed files with 93 additions and 98 deletions
+3 -3
View File
@@ -387,7 +387,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
// fall through
case ROW_STEPS_TYPE:
m_textValue[ROW_STEPS_TYPE].SetText( GAMEMAN->StepsTypeToLocalizedString(GetSelectedStepsType()) );
m_textValue[ROW_STEPS_TYPE].SetText( GAMEMAN->GetStepsTypeInfo(GetSelectedStepsType()).GetLocalizedString() );
{
Difficulty dcOld = Difficulty_Invalid;
@@ -476,7 +476,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
// fall through
case ROW_STEPS:
{
RString s = DifficultyToLocalizedString(GetSelectedDifficulty());
RString s = DifficultyToLocalizedString( GetSelectedDifficulty() );
// UGLY. "Edit" -> "New Edit"
switch( EDIT_MODE.GetValue() )
@@ -501,7 +501,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
case ROW_SOURCE_STEPS_TYPE:
m_textLabel[ROW_SOURCE_STEPS_TYPE].SetVisible( GetSelectedSteps() ? false : true );
m_textValue[ROW_SOURCE_STEPS_TYPE].SetVisible( GetSelectedSteps() ? false : true );
m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GAMEMAN->StepsTypeToLocalizedString(GetSelectedSourceStepsType()) );
m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GAMEMAN->GetStepsTypeInfo(GetSelectedSourceStepsType()).GetLocalizedString() );
m_vpSourceSteps.clear();
m_vpSourceSteps.push_back( StepsAndDifficulty(NULL,Difficulty_Invalid) ); // "blank"