name cleanup:

ScreenOptionsMenu -> ScreenOptionsService
ScreenOptionsSubMenu -> ScreenOptionsServiceChild
This commit is contained in:
Chris Danford
2005-07-14 05:33:50 +00:00
parent 0a46e5f99b
commit a61ab97303
3 changed files with 26 additions and 13 deletions
+1 -1
View File
@@ -50,7 +50,7 @@
* left, right -> change row * left, right -> change row
* up, down -> change row * up, down -> change row
* start -> next screen * start -> next screen
* This is a specialized navigation for ScreenOptionsMenu. It must be enabled to * This is a specialized navigation for ScreenOptionsService. It must be enabled to
* allow screens that use rows to select other screens to work with only three * allow screens that use rows to select other screens to work with only three
* buttons. (It's also used when in five-key mode.) * buttons. (It's also used when in five-key mode.)
* *
+23 -10
View File
@@ -81,11 +81,12 @@ ScreenOptionsEditProfile::~ScreenOptionsEditProfile()
void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector<PlayerNumber> &vpns ) void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector<PlayerNumber> &vpns )
{ {
Profile &pro = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sLastSelectedProfileID );
OptionRow &row = *m_pRows[iRow];
switch( iRow ) switch( iRow )
{ {
case ROW_CHARACTER: case ROW_CHARACTER:
Profile &pro = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sLastSelectedProfileID );
OptionRow &row = *m_pRows[ROW_CHARACTER];
row.SetOneSharedSelectionIfPresent( pro.m_sCharacter ); row.SetOneSharedSelectionIfPresent( pro.m_sCharacter );
break; break;
} }
@@ -93,17 +94,32 @@ void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector<PlayerNumbe
void ScreenOptionsEditProfile::ExportOptions( int iRow, const vector<PlayerNumber> &vpns ) void ScreenOptionsEditProfile::ExportOptions( int iRow, const vector<PlayerNumber> &vpns )
{ {
Profile &pro = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sLastSelectedProfileID );
OptionRow &row = *m_pRows[iRow];
int iIndex = row.GetOneSharedSelection( true );
CString sValue;
if( iIndex >= 0 )
sValue = row.GetRowDef().m_vsChoices[ iIndex ];
switch( iRow )
{
case ROW_NAME:
pro.m_sDisplayName = sValue;
break;
case ROW_CHARACTER:
pro.m_sCharacter = sValue;
break;
}
} }
void ScreenOptionsEditProfile::GoToNextScreen() void ScreenOptionsEditProfile::GoToNextScreen()
{ {
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsService" );
} }
void ScreenOptionsEditProfile::GoToPrevScreen() void ScreenOptionsEditProfile::GoToPrevScreen()
{ {
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsService" );
} }
void ScreenOptionsEditProfile::HandleScreenMessage( const ScreenMessage SM ) void ScreenOptionsEditProfile::HandleScreenMessage( const ScreenMessage SM )
@@ -152,12 +168,6 @@ void ScreenOptionsEditProfile::ProcessMenuStart( PlayerNumber pn, const InputEve
break; break;
case ROW_CHARACTER: case ROW_CHARACTER:
{ {
/*
int iProfileIndex = iRow - 1;
int iThrowAway, iX, iY;
GetWidthXY( PLAYER_1, iRow, 0, iThrowAway, iX, iY );
ScreenMiniMenu::MiniMenu( &g_ProfileContextMenu, SM_BackFromProfileContextMenu, SM_BackFromProfileContextMenu, (float)iX, (float)iY );
*/
} }
break; break;
case ROW_DELETE: case ROW_DELETE:
@@ -167,6 +177,9 @@ void ScreenOptionsEditProfile::ProcessMenuStart( PlayerNumber pn, const InputEve
ScreenPrompt::Prompt( SM_BackFromDelete, sMessage, PROMPT_YES_NO ); ScreenPrompt::Prompt( SM_BackFromDelete, sMessage, PROMPT_YES_NO );
} }
break; break;
default:
ScreenOptions::ProcessMenuStart( pn, type );
break;
} }
} }
+2 -2
View File
@@ -132,12 +132,12 @@ void ScreenProfileOptions::HandleScreenMessage( const ScreenMessage SM )
if( SM == SM_GoToNextScreen ) if( SM == SM_GoToNextScreen )
{ {
PREFSMAN->SaveGlobalPrefsToDisk(); PREFSMAN->SaveGlobalPrefsToDisk();
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsService" );
return; return;
} }
else if( SM == SM_GoToPrevScreen ) else if( SM == SM_GoToPrevScreen )
{ {
SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); SCREENMAN->SetNewScreen( "ScreenOptionsService" );
return; return;
} }
else if( SM == SM_DoneCreating ) else if( SM == SM_DoneCreating )