Store the selected name to the profile before trimming spaces, so that the name

appears properly next time the player enters their name.
This commit is contained in:
Thad Ward
2004-05-24 09:40:26 +00:00
parent 438347135d
commit 28a3a099b1
+5 -4
View File
@@ -573,16 +573,17 @@ void ScreenNameEntryTraditional::Finish( PlayerNumber pn )
UpdateSelectionText( pn ); /* hide NAME_ cursor */
CString selection = WStringToCString( m_sSelection[pn] );
TrimRight( selection, " " );
TrimLeft( selection, " " );
GAMESTATE->StoreRankingName( pn, selection );
// save last used ranking name
Profile* pProfile = PROFILEMAN->GetProfile(pn);
if( pProfile )
pProfile->m_sLastUsedHighScoreName = selection;
TrimRight( selection, " " );
TrimLeft( selection, " " );
GAMESTATE->StoreRankingName( pn, selection );
OFF_COMMAND( m_Keyboard[pn] );
for( int i = 0; i < (int)m_textAlphabet[pn].size(); ++i )
OFF_COMMAND( m_textAlphabet[pn][i] );