use OptionRowHandler::m_Def

This commit is contained in:
Glenn Maynard
2006-01-17 21:23:26 +00:00
parent 3bd5beeb53
commit 2b9bb0ec44
5 changed files with 140 additions and 106 deletions
+8 -3
View File
@@ -7,6 +7,7 @@
#include "ScreenManager.h"
#include "ScreenPrompt.h"
#include "LocalizedString.h"
#include "OptionRowHandler.h"
REGISTER_SCREEN_CLASS( ScreenOptionsMemoryCard );
@@ -15,6 +16,8 @@ void ScreenOptionsMemoryCard::Init()
{
ScreenOptions::Init();
vector<OptionRowHandler*> vHands;
FOREACH_CONST( UsbStorageDevice, MEMCARDMAN->GetStorageDevices(), iter )
{
// TODO: Make these string themable
@@ -33,8 +36,12 @@ void ScreenOptionsMemoryCard::Init()
else
vs.push_back( ssprintf("%dMB",iter->iVolumeSizeMB) );
vHands.push_back( OptionRowHandlerUtil::MakeNull() );
OptionRowDefinition &def = vHands.back()->m_Def;
CString sDescription = join(", ", vs);
OptionRowDefinition def( sDescription, true, "" );
def.m_sName = sDescription;
def.m_vsChoices.push_back( "" );
def.m_sExplanationName = "Memory Card";
def.m_bAllowThemeTitle = false;
def.m_bOneChoiceForAllPlayers = true;
@@ -47,8 +54,6 @@ void ScreenOptionsMemoryCard::Init()
m_vDefs.push_back( def );
}
vector<OptionRowHandler*> vHands( m_vDefs.size(), NULL );
InitMenu( m_vDefs, vHands );
}