diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 945084f388..599e2a3939 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -50,7 +50,7 @@ * left, right -> change row * up, down -> change row * 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 * buttons. (It's also used when in five-key mode.) * diff --git a/stepmania/src/ScreenOptionsEditProfile.cpp b/stepmania/src/ScreenOptionsEditProfile.cpp index 54119e1b72..9d92a7b5ff 100644 --- a/stepmania/src/ScreenOptionsEditProfile.cpp +++ b/stepmania/src/ScreenOptionsEditProfile.cpp @@ -81,11 +81,12 @@ ScreenOptionsEditProfile::~ScreenOptionsEditProfile() void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector &vpns ) { + Profile &pro = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sLastSelectedProfileID ); + OptionRow &row = *m_pRows[iRow]; + switch( iRow ) { case ROW_CHARACTER: - Profile &pro = PROFILEMAN->GetLocalProfile( GAMESTATE->m_sLastSelectedProfileID ); - OptionRow &row = *m_pRows[ROW_CHARACTER]; row.SetOneSharedSelectionIfPresent( pro.m_sCharacter ); break; } @@ -93,17 +94,32 @@ void ScreenOptionsEditProfile::ImportOptions( int iRow, const vector &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() { - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); + SCREENMAN->SetNewScreen( "ScreenOptionsService" ); } void ScreenOptionsEditProfile::GoToPrevScreen() { - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); + SCREENMAN->SetNewScreen( "ScreenOptionsService" ); } void ScreenOptionsEditProfile::HandleScreenMessage( const ScreenMessage SM ) @@ -152,12 +168,6 @@ void ScreenOptionsEditProfile::ProcessMenuStart( PlayerNumber pn, const InputEve break; 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; case ROW_DELETE: @@ -167,6 +177,9 @@ void ScreenOptionsEditProfile::ProcessMenuStart( PlayerNumber pn, const InputEve ScreenPrompt::Prompt( SM_BackFromDelete, sMessage, PROMPT_YES_NO ); } break; + default: + ScreenOptions::ProcessMenuStart( pn, type ); + break; } } diff --git a/stepmania/src/ScreenProfileOptions.cpp b/stepmania/src/ScreenProfileOptions.cpp index 867fc6ae53..8e326cf9c9 100644 --- a/stepmania/src/ScreenProfileOptions.cpp +++ b/stepmania/src/ScreenProfileOptions.cpp @@ -132,12 +132,12 @@ void ScreenProfileOptions::HandleScreenMessage( const ScreenMessage SM ) if( SM == SM_GoToNextScreen ) { PREFSMAN->SaveGlobalPrefsToDisk(); - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); + SCREENMAN->SetNewScreen( "ScreenOptionsService" ); return; } else if( SM == SM_GoToPrevScreen ) { - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); + SCREENMAN->SetNewScreen( "ScreenOptionsService" ); return; } else if( SM == SM_DoneCreating )