polish
This commit is contained in:
@@ -79,11 +79,11 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
|||||||
int iIndex = 0;
|
int iIndex = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
def.m_sName = "";
|
def.m_sName = "Create New Edit Steps";
|
||||||
def.m_bAllowThemeTitle = false;
|
def.m_bAllowThemeTitle = false;
|
||||||
def.m_sExplanationName = "Create New Edit Steps";
|
def.m_sExplanationName = "Create New Edit Steps";
|
||||||
def.m_vsChoices.clear();
|
def.m_vsChoices.clear();
|
||||||
def.m_vsChoices.push_back( "Create New Edit Steps" );
|
def.m_vsChoices.push_back( "" );
|
||||||
vDefs.push_back( def );
|
vDefs.push_back( def );
|
||||||
vHands.push_back( NULL );
|
vHands.push_back( NULL );
|
||||||
iIndex++;
|
iIndex++;
|
||||||
@@ -94,11 +94,11 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
|||||||
FOREACH_CONST( Steps*, m_vpSteps, s )
|
FOREACH_CONST( Steps*, m_vpSteps, s )
|
||||||
{
|
{
|
||||||
CString sType = GAMEMAN->StepsTypeToThemedString( (*s)->m_StepsType );
|
CString sType = GAMEMAN->StepsTypeToThemedString( (*s)->m_StepsType );
|
||||||
def.m_sName = sType;
|
def.m_sName = (*s)->GetDescription();
|
||||||
def.m_sExplanationName = "Edit Steps";
|
def.m_sExplanationName = "Edit Steps";
|
||||||
def.m_bAllowThemeItems = false;
|
def.m_bAllowThemeItems = false;
|
||||||
def.m_vsChoices.clear();
|
def.m_vsChoices.clear();
|
||||||
def.m_vsChoices.push_back( (*s)->GetDescription() );
|
def.m_vsChoices.push_back( sType );
|
||||||
vDefs.push_back( def );
|
vDefs.push_back( def );
|
||||||
vHands.push_back( NULL );
|
vHands.push_back( NULL );
|
||||||
iIndex++;
|
iIndex++;
|
||||||
|
|||||||
@@ -20,16 +20,32 @@ void ScreenOptionsMemoryCard::Init()
|
|||||||
|
|
||||||
FOREACH_CONST( UsbStorageDevice, MEMCARDMAN->GetStorageDevices(), iter )
|
FOREACH_CONST( UsbStorageDevice, MEMCARDMAN->GetStorageDevices(), iter )
|
||||||
{
|
{
|
||||||
CString sOsMountDir = iter->sOsMountDir;
|
// TODO: Make these string themable
|
||||||
if( sOsMountDir.empty() )
|
|
||||||
sOsMountDir = "(not mounted)";
|
vector<CString> vs;
|
||||||
CString sVolumeLabel = iter->sVolumeLabel;
|
if( iter->sOsMountDir.empty() )
|
||||||
if( sVolumeLabel.empty() )
|
vs.push_back( "(no mount dir)" );
|
||||||
sVolumeLabel = "(no label)";
|
else
|
||||||
CString sDescription = ssprintf( "%s %s", sOsMountDir.c_str(), sVolumeLabel.c_str() );
|
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, "" );
|
OptionRowDefinition def( sDescription, true, "" );
|
||||||
|
def.m_sExplanationName = "Memory Card";
|
||||||
def.m_bAllowThemeTitle = false;
|
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 );
|
m_vDefs.push_back( def );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +61,7 @@ void ScreenOptionsMemoryCard::BeginScreen()
|
|||||||
// select the last chosen memory card (if present)
|
// select the last chosen memory card (if present)
|
||||||
if( !MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get().empty() )
|
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++ )
|
for( unsigned i=0; i<v.size(); i++ )
|
||||||
{
|
{
|
||||||
if( v[i].sOsMountDir == MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get() )
|
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 )
|
void ScreenOptionsMemoryCard::HandleScreenMessage( const ScreenMessage SM )
|
||||||
@@ -66,6 +84,7 @@ void ScreenOptionsMemoryCard::HandleMessage( const CString& sMessage )
|
|||||||
{
|
{
|
||||||
if( sMessage == MessageToString(Message_StorageDevicesChanged) )
|
if( sMessage == MessageToString(Message_StorageDevicesChanged) )
|
||||||
{
|
{
|
||||||
|
if( !m_Out.IsTransitioning() )
|
||||||
SCREENMAN->SetNewScreen( this->m_sName ); // reload
|
SCREENMAN->SetNewScreen( this->m_sName ); // reload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,21 +108,21 @@ void ScreenOptionsMemoryCard::ExportOptions( int iRow, const vector<PlayerNumber
|
|||||||
PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber;
|
PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber;
|
||||||
if( m_iCurrentRow[pn] == iRow )
|
if( m_iCurrentRow[pn] == iRow )
|
||||||
{
|
{
|
||||||
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
|
const vector<UsbStorageDevice> &v = MEMCARDMAN->GetStorageDevices();
|
||||||
|
if( iRow < v.size() )
|
||||||
|
{
|
||||||
const UsbStorageDevice &dev = v[iRow];
|
const UsbStorageDevice &dev = v[iRow];
|
||||||
MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Set( dev.sOsMountDir );
|
MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Set( dev.sOsMountDir );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsMemoryCard::ProcessMenuStart( const InputEventPlus &input )
|
void ScreenOptionsMemoryCard::ProcessMenuStart( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
int iCurRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
|
int iCurRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
|
||||||
|
|
||||||
if( iCurRow == (int)m_pRows.size()-1 ) // "exit"
|
const vector<UsbStorageDevice> &v = MEMCARDMAN->GetStorageDevices();
|
||||||
{
|
if( iCurRow < v.size() ) // a card
|
||||||
MenuBack( GAMESTATE->m_MasterPlayerNumber );
|
|
||||||
}
|
|
||||||
else // a card
|
|
||||||
{
|
{
|
||||||
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
|
const vector<UsbStorageDevice> v = MEMCARDMAN->GetStorageDevices();
|
||||||
const UsbStorageDevice &dev = v[iCurRow];
|
const UsbStorageDevice &dev = v[iCurRow];
|
||||||
@@ -119,6 +138,10 @@ void ScreenOptionsMemoryCard::ProcessMenuStart( const InputEventPlus &input )
|
|||||||
ScreenPrompt::Prompt( SM_None, s );
|
ScreenPrompt::Prompt( SM_None, s );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SCREENMAN->PlayInvalidSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -312,7 +312,8 @@ static CString CopyEditsMachineToMemoryCard()
|
|||||||
|
|
||||||
MEMCARDMAN->UnmountCard(pn);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,7 +382,8 @@ static CString CopyEditsMemoryCardToMachine()
|
|||||||
PROFILEMAN->SaveMachineProfile();
|
PROFILEMAN->SaveMachineProfile();
|
||||||
PROFILEMAN->LoadMachineProfile();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user