This commit is contained in:
Chris Danford
2005-12-04 09:01:28 +00:00
parent cf5e658c00
commit b0350450e3
3 changed files with 49 additions and 24 deletions
@@ -79,11 +79,11 @@ void ScreenOptionsManageEditSteps::BeginScreen()
int iIndex = 0;
{
def.m_sName = "";
def.m_sName = "Create New Edit Steps";
def.m_bAllowThemeTitle = false;
def.m_sExplanationName = "Create New Edit Steps";
def.m_vsChoices.clear();
def.m_vsChoices.push_back( "Create New Edit Steps" );
def.m_vsChoices.push_back( "" );
vDefs.push_back( def );
vHands.push_back( NULL );
iIndex++;
@@ -94,11 +94,11 @@ void ScreenOptionsManageEditSteps::BeginScreen()
FOREACH_CONST( Steps*, m_vpSteps, s )
{
CString sType = GAMEMAN->StepsTypeToThemedString( (*s)->m_StepsType );
def.m_sName = sType;
def.m_sName = (*s)->GetDescription();
def.m_sExplanationName = "Edit Steps";
def.m_bAllowThemeItems = false;
def.m_vsChoices.clear();
def.m_vsChoices.push_back( (*s)->GetDescription() );
def.m_vsChoices.push_back( sType );
vDefs.push_back( def );
vHands.push_back( NULL );
iIndex++;
+41 -18
View File
@@ -20,16 +20,32 @@ void ScreenOptionsMemoryCard::Init()
FOREACH_CONST( UsbStorageDevice, MEMCARDMAN->GetStorageDevices(), iter )
{
CString sOsMountDir = iter->sOsMountDir;
if( sOsMountDir.empty() )
sOsMountDir = "(not mounted)";
CString sVolumeLabel = iter->sVolumeLabel;
if( sVolumeLabel.empty() )
sVolumeLabel = "(no label)";
CString sDescription = ssprintf( "%s %s", sOsMountDir.c_str(), sVolumeLabel.c_str() );
// TODO: Make these string themable
vector<CString> vs;
if( iter->sOsMountDir.empty() )
vs.push_back( "(no mount dir)" );
else
vs.push_back( iter->sOsMountDir );
if( iter->sVolumeLabel.empty() )
vs.push_back( "(no label)" );
else
vs.push_back( iter->sVolumeLabel );
if( iter->iVolumeSizeMB == 0 )
vs.push_back( "size ???" );
else
vs.push_back( ssprintf("%dMB",iter->iVolumeSizeMB) );
CString sDescription = join(", ", vs);
OptionRowDefinition def( sDescription, true, "" );
def.m_sExplanationName = "Memory Card";
def.m_bAllowThemeTitle = false;
def.m_bAllowExplanation = false;
m_vDefs.push_back( def );
}
if( MEMCARDMAN->GetStorageDevices().empty() )
{
OptionRowDefinition def( "No memory cards detected", true, "" );
m_vDefs.push_back( def );
}
@@ -45,7 +61,7 @@ void ScreenOptionsMemoryCard::BeginScreen()
// select the last chosen memory card (if present)
if( !MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get().empty() )
{
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
const vector<UsbStorageDevice> &v = MEMCARDMAN->GetStorageDevices();
for( unsigned i=0; i<v.size(); i++ )
{
if( v[i].sOsMountDir == MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get() )
@@ -55,6 +71,8 @@ void ScreenOptionsMemoryCard::BeginScreen()
}
}
}
this->SubscribeToMessage( Message_StorageDevicesChanged );
}
void ScreenOptionsMemoryCard::HandleScreenMessage( const ScreenMessage SM )
@@ -66,7 +84,8 @@ void ScreenOptionsMemoryCard::HandleMessage( const CString& sMessage )
{
if( sMessage == MessageToString(Message_StorageDevicesChanged) )
{
SCREENMAN->SetNewScreen( this->m_sName ); // reload
if( !m_Out.IsTransitioning() )
SCREENMAN->SetNewScreen( this->m_sName ); // reload
}
}
@@ -89,9 +108,12 @@ void ScreenOptionsMemoryCard::ExportOptions( int iRow, const vector<PlayerNumber
PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber;
if( m_iCurrentRow[pn] == iRow )
{
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
const UsbStorageDevice &dev = v[iRow];
MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Set( dev.sOsMountDir );
const vector<UsbStorageDevice> &v = MEMCARDMAN->GetStorageDevices();
if( iRow < v.size() )
{
const UsbStorageDevice &dev = v[iRow];
MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Set( dev.sOsMountDir );
}
}
}
@@ -99,11 +121,8 @@ void ScreenOptionsMemoryCard::ProcessMenuStart( const InputEventPlus &input )
{
int iCurRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
if( iCurRow == (int)m_pRows.size()-1 ) // "exit"
{
MenuBack( GAMESTATE->m_MasterPlayerNumber );
}
else // a card
const vector<UsbStorageDevice> &v = MEMCARDMAN->GetStorageDevices();
if( iCurRow < v.size() ) // a card
{
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
const UsbStorageDevice &dev = v[iCurRow];
@@ -119,6 +138,10 @@ void ScreenOptionsMemoryCard::ProcessMenuStart( const InputEventPlus &input )
ScreenPrompt::Prompt( SM_None, s );
}
}
else
{
SCREENMAN->PlayInvalidSound();
}
}
/*
+4 -2
View File
@@ -312,7 +312,8 @@ static CString CopyEditsMachineToMemoryCard()
MEMCARDMAN->UnmountCard(pn);
return ssprintf("Copied to P%d card: %d/%d copies OK (%d overwritten).",pn+1,iNumSuccessful,iNumAttempted,iNumOverwritten);
// TODO: Make string themable
return ssprintf("Copied to P%d card:\n%d/%d copies OK (%d overwritten).",pn+1,iNumSuccessful,iNumAttempted,iNumOverwritten);
break;
}
@@ -381,7 +382,8 @@ static CString CopyEditsMemoryCardToMachine()
PROFILEMAN->SaveMachineProfile();
PROFILEMAN->LoadMachineProfile();
return ssprintf("Copied from P%d card: %d/%d copies OK (%d overwritten).",pn+1,iNumSuccessful,iNumAttempted,iNumOverwritten);
// TODO: Make themeable
return ssprintf("Copied from P%d card:\n%d/%d copies OK (%d overwritten).",pn+1,iNumSuccessful,iNumAttempted,iNumOverwritten);
break;
}