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:
@@ -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] );
|
||||
|
||||
Reference in New Issue
Block a user