phase out vDefs param
This commit is contained in:
@@ -198,9 +198,12 @@ void ScreenOptions::Init()
|
||||
|
||||
void ScreenOptions::InitMenu( const vector<OptionRowDefinition> &vDefs, const vector<OptionRowHandler*> &vHands )
|
||||
{
|
||||
LOG->Trace( "ScreenOptions::InitMenu()" );
|
||||
InitMenu( vHands );
|
||||
}
|
||||
|
||||
ASSERT( vDefs.size() == vHands.size() );
|
||||
void ScreenOptions::InitMenu( const vector<OptionRowHandler*> &vHands )
|
||||
{
|
||||
LOG->Trace( "ScreenOptions::InitMenu()" );
|
||||
|
||||
for( unsigned i=0; i<m_pRows.size(); i++ )
|
||||
{
|
||||
@@ -209,15 +212,15 @@ void ScreenOptions::InitMenu( const vector<OptionRowDefinition> &vDefs, const ve
|
||||
}
|
||||
m_pRows.clear();
|
||||
|
||||
for( unsigned r=0; r<vDefs.size(); r++ ) // foreach row
|
||||
for( unsigned r=0; r<vHands.size(); r++ ) // foreach row
|
||||
{
|
||||
m_pRows.push_back( new OptionRow(&m_OptionRowType) );
|
||||
OptionRow &row = *m_pRows.back();
|
||||
row.SetDrawOrder( 1 );
|
||||
m_framePage.AddChild( &row );
|
||||
|
||||
const OptionRowDefinition &def = vDefs[r];
|
||||
OptionRowHandler* hand = vHands[r];
|
||||
const OptionRowDefinition &def = vHands[r]->m_Def;
|
||||
|
||||
bool bFirstRowGoesDown = m_OptionsNavigation==NAV_TOGGLE_THREE_KEY;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
ScreenOptions();
|
||||
virtual void Init();
|
||||
virtual void BeginScreen();
|
||||
void InitMenu( const vector<OptionRowHandler*> &vHands );
|
||||
void InitMenu( const vector<OptionRowDefinition> &vDefs, const vector<OptionRowHandler*> &vHands );
|
||||
virtual ~ScreenOptions();
|
||||
virtual void Update( float fDeltaTime );
|
||||
|
||||
@@ -57,7 +57,6 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
SONGMAN->GetSongs( m_vpDisplayedSongs );
|
||||
|
||||
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> vHands;
|
||||
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -67,7 +66,6 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
FOREACH_CourseType( i )
|
||||
pHand->m_Def.m_vsChoices.push_back( CourseTypeToLocalizedString(i) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -78,7 +76,6 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.push_back( "Auto" );
|
||||
for( int i=MIN_METER; i<=MAX_METER; i++ )
|
||||
pHand->m_Def.m_vsChoices.push_back( ssprintf("%d",i) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
FOREACH_CONST( CourseEntry, pCourse->m_vEntries, ce )
|
||||
@@ -91,7 +88,6 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
FOREACH_CONST( Song*, m_vpDisplayedSongs, s )
|
||||
pHand->m_Def.m_vsChoices.push_back( (*s)->GetTranslitFullTitle() );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
}
|
||||
|
||||
@@ -101,10 +97,9 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
pHand->m_Def.m_bExportOnChange = true;
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
pHand->m_Def.m_vsChoices.push_back( "Insert Entry" );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
ScreenOptions::InitMenu( vDefs, vHands );
|
||||
ScreenOptions::InitMenu( vHands );
|
||||
|
||||
ScreenOptions::BeginScreen();
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
m_Original = ce;
|
||||
|
||||
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> vHands;
|
||||
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -75,7 +74,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.push_back( "(any)" );
|
||||
FOREACH_CONST( CString, vsSongGroups, song )
|
||||
pHand->m_Def.m_vsChoices.push_back( *song );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -84,7 +82,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_bExportOnChange = true;
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
FillSongsAndChoices( ce.sSongGroup, m_vpDisplayedSongs, pHand->m_Def.m_vsChoices );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -95,7 +92,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.push_back( "(any)" );
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||
pHand->m_Def.m_vsChoices.push_back( DifficultyToLocalizedString(*dc) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -106,7 +102,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.push_back( "(any)" );
|
||||
for( int i=MIN_METER; i<=MAX_METER; i++ )
|
||||
pHand->m_Def.m_vsChoices.push_back( ssprintf("%i",i) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -117,7 +112,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.push_back( "(any)" );
|
||||
for( int i=MIN_METER; i<=MAX_METER; i++ )
|
||||
pHand->m_Def.m_vsChoices.push_back( ssprintf("%i",i) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -127,7 +121,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
FOREACH_SongSort( i )
|
||||
pHand->m_Def.m_vsChoices.push_back( SongSortToLocalizedString(i) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -137,7 +130,6 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
for( int i=0; i<20; i++ )
|
||||
pHand->m_Def.m_vsChoices.push_back( FormatNumberAndSuffix(i+1) );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
pHand = OptionRowHandlerUtil::MakeNull();
|
||||
@@ -147,10 +139,9 @@ void ScreenOptionsEditCourseEntry::BeginScreen()
|
||||
pHand->m_Def.m_vsChoices.clear();
|
||||
CString s = ssprintf( "%d mod changes", ce.GetNumModChanges() );
|
||||
pHand->m_Def.m_vsChoices.push_back( s );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
vHands.push_back( pHand );
|
||||
|
||||
ScreenOptions::InitMenu( vDefs, vHands );
|
||||
ScreenOptions::InitMenu( vHands );
|
||||
|
||||
ScreenOptions::BeginScreen();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ void ScreenOptionsEditProfile::BeginScreen()
|
||||
{
|
||||
m_Original = *GAMESTATE->GetEditLocalProfile();
|
||||
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> vHands;
|
||||
|
||||
Profile *pProfile = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sEditLocalProfileID );
|
||||
@@ -49,10 +48,9 @@ void ScreenOptionsEditProfile::BeginScreen()
|
||||
CHARMAN->GetCharacters( vpCharacters );
|
||||
FOREACH_CONST( Character*, vpCharacters, c )
|
||||
def.m_vsChoices.push_back( (*c)->GetDisplayName() );
|
||||
vDefs.push_back( def );
|
||||
}
|
||||
|
||||
InitMenu( vDefs, vHands );
|
||||
InitMenu( vHands );
|
||||
|
||||
ScreenOptions::BeginScreen();
|
||||
}
|
||||
|
||||
@@ -146,7 +146,6 @@ void ScreenOptionsManageCourses::BeginScreen()
|
||||
}
|
||||
|
||||
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> vHands;
|
||||
|
||||
int iIndex = 0;
|
||||
@@ -158,7 +157,6 @@ void ScreenOptionsManageCourses::BeginScreen()
|
||||
def.m_sName = "";
|
||||
def.m_vsChoices.clear();
|
||||
def.m_vsChoices.push_back( "Create New" );
|
||||
vDefs.push_back( def );
|
||||
iIndex++;
|
||||
}
|
||||
|
||||
@@ -206,11 +204,10 @@ void ScreenOptionsManageCourses::BeginScreen()
|
||||
def.m_layoutType = LAYOUT_SHOW_ONE_IN_ROW;
|
||||
def.m_vsChoices.clear();
|
||||
def.m_vsChoices.push_back( (*c)->GetDisplayFullTitle() );
|
||||
vDefs.push_back( def );
|
||||
iIndex++;
|
||||
}
|
||||
|
||||
ScreenOptions::InitMenu( vDefs, vHands );
|
||||
ScreenOptions::InitMenu( vHands );
|
||||
|
||||
ScreenOptions::BeginScreen();
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ void ScreenOptionsManageEditSteps::Init()
|
||||
|
||||
void ScreenOptionsManageEditSteps::BeginScreen()
|
||||
{
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> vHands;
|
||||
|
||||
int iIndex = 0;
|
||||
@@ -88,7 +87,6 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
||||
def.m_sExplanationName = "Create New Edit Steps";
|
||||
def.m_vsChoices.clear();
|
||||
def.m_vsChoices.push_back( "" );
|
||||
vDefs.push_back( def );
|
||||
iIndex++;
|
||||
}
|
||||
|
||||
@@ -105,11 +103,10 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
||||
CString sType = GAMEMAN->StepsTypeToLocalizedString( (*s)->m_StepsType );
|
||||
def.m_vsChoices.push_back( sType );
|
||||
def.m_bAllowThemeItems = false; // already themed
|
||||
vDefs.push_back( def );
|
||||
iIndex++;
|
||||
}
|
||||
|
||||
ScreenOptions::InitMenu( vDefs, vHands );
|
||||
ScreenOptions::InitMenu( vHands );
|
||||
|
||||
ScreenOptions::BeginScreen();
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ void ScreenOptionsManageProfiles::Init()
|
||||
void ScreenOptionsManageProfiles::BeginScreen()
|
||||
{
|
||||
int iIndex = 0;
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> OptionRowHandlers;
|
||||
|
||||
if( SHOW_CREATE_NEW )
|
||||
@@ -107,7 +106,6 @@ void ScreenOptionsManageProfiles::BeginScreen()
|
||||
pHand->m_Def.m_bAllowThemeTitle = false;
|
||||
pHand->m_Def.m_bAllowThemeItems = false;
|
||||
OptionRowHandlers.push_back( pHand );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
|
||||
// FIXME
|
||||
// gc.Load( iIndex++, );
|
||||
@@ -127,13 +125,12 @@ void ScreenOptionsManageProfiles::BeginScreen()
|
||||
pHand->m_Def.m_bAllowThemeItems = false;
|
||||
pHand->m_Def.m_sName = ssprintf( "%d", iIndex );
|
||||
OptionRowHandlers.push_back( pHand );
|
||||
vDefs.push_back( pHand->m_Def );
|
||||
|
||||
// FIXME
|
||||
// gc.Load( iIndex++, );
|
||||
}
|
||||
|
||||
ScreenOptions::InitMenu( vDefs, OptionRowHandlers );
|
||||
ScreenOptions::InitMenu( OptionRowHandlers );
|
||||
|
||||
ScreenOptions::BeginScreen();
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ void ScreenOptionsMaster::Init()
|
||||
// Call this after enabling players, if any.
|
||||
ScreenOptions::Init();
|
||||
|
||||
vector<OptionRowDefinition> OptionRowDefs;
|
||||
vector<OptionRowHandler*> OptionRowHandlers;
|
||||
for( unsigned i = 0; i < asLineNames.size(); ++i )
|
||||
{
|
||||
@@ -63,13 +62,12 @@ void ScreenOptionsMaster::Init()
|
||||
if( pHand == NULL )
|
||||
RageException::Throw( "Invalid OptionRowHandler '%s' in %s::Line%i", cmds.GetOriginalCommandString().c_str(), m_sName.c_str(), i );
|
||||
OptionRowHandlers.push_back( pHand );
|
||||
OptionRowDefs.push_back( pHand->m_Def );
|
||||
}
|
||||
|
||||
ASSERT( OptionRowHandlers.size() == asLineNames.size() );
|
||||
|
||||
|
||||
InitMenu( OptionRowDefs, OptionRowHandlers );
|
||||
InitMenu( OptionRowHandlers );
|
||||
}
|
||||
|
||||
void ScreenOptionsMaster::ImportOptions( int r, const vector<PlayerNumber> &vpns )
|
||||
|
||||
@@ -45,16 +45,14 @@ void ScreenOptionsMemoryCard::Init()
|
||||
def.m_sExplanationName = "Memory Card";
|
||||
def.m_bAllowThemeTitle = false;
|
||||
def.m_bOneChoiceForAllPlayers = true;
|
||||
m_vDefs.push_back( def );
|
||||
}
|
||||
|
||||
if( MEMCARDMAN->GetStorageDevices().empty() )
|
||||
{
|
||||
OptionRowDefinition def( "No memory cards detected", true, "" );
|
||||
m_vDefs.push_back( def );
|
||||
}
|
||||
|
||||
InitMenu( m_vDefs, vHands );
|
||||
InitMenu( vHands );
|
||||
}
|
||||
|
||||
void ScreenOptionsMemoryCard::BeginScreen()
|
||||
|
||||
@@ -18,8 +18,6 @@ private:
|
||||
void HandleMessage( const CString& sMessage );
|
||||
|
||||
void ProcessMenuStart( const InputEventPlus &input );
|
||||
|
||||
vector<OptionRowDefinition> m_vDefs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,6 @@ void ScreenSMOnlineLogin::Init()
|
||||
ScreenOptions::Init();
|
||||
m_iPlayer = 0;
|
||||
|
||||
vector<OptionRowDefinition> vDefs;
|
||||
vector<OptionRowHandler*> vHands;
|
||||
vHands.push_back( OptionRowHandlerUtil::MakeNull() );
|
||||
OptionRowDefinition &def = vHands.back()->m_Def;
|
||||
@@ -45,9 +44,7 @@ void ScreenSMOnlineLogin::Init()
|
||||
SCREENMAN->SetNewScreen("ScreenProfileOptions");
|
||||
}
|
||||
|
||||
vDefs.push_back( def );
|
||||
|
||||
InitMenu( vDefs, vHands );
|
||||
InitMenu( vHands );
|
||||
SOUND->PlayMusic( THEME->GetPathS("ScreenMachineOptions", "music"));
|
||||
OptionRow &row = *m_pRows.back();
|
||||
row.SetExitText("Login");
|
||||
|
||||
Reference in New Issue
Block a user