diff --git a/stepmania/src/RoomWheel.cpp b/stepmania/src/RoomWheel.cpp index 55ed8a8fc2..d6cf1a5ffa 100644 --- a/stepmania/src/RoomWheel.cpp +++ b/stepmania/src/RoomWheel.cpp @@ -87,6 +87,7 @@ void RoomWheel::AddPerminateItem(RoomWheelData* itemdata) AddItem( itemdata ); } +static LocalizedString ENTER_ROOM_NAME( "RoomWheel", "Enter room name" ); bool RoomWheel::Select() { RetractInfoBox(); @@ -96,7 +97,7 @@ bool RoomWheel::Select() { // Since this is not actually an option outside of this wheel NULL is a good idea. m_LastSelection = NULL; - ScreenTextEntry::TextEntry( SM_BackFromRoomName, "Enter Room Name:", "", 255 ); + ScreenTextEntry::TextEntry( SM_BackFromRoomName, ENTER_ROOM_NAME, "", 255 ); } return false; } diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 0f1a6cef76..0da5765e66 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2489,6 +2489,8 @@ static LocalizedString DESTROY_ALL_UNSAVED_CHANGES ( "ScreenEdit", "This will de static LocalizedString REVERT_FROM_DISK ( "ScreenEdit", "Do you want to revert from disk?" ); static LocalizedString SAVE_CHANGES_BEFORE_EXITING ( "ScreenEdit", "Do you want to save changes before exiting?" ); static LocalizedString SAVED ( "ScreenEdit", "Saved '%s'" ); +static LocalizedString ENTER_BPM_VALUE ( "ScreenEdit", "Enter a new BPM value." ); +static LocalizedString ENTER_STOP_VALUE ( "ScreenEdit", "Enter a new Stop value." ); void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAnswers ) { switch( c ) @@ -2643,7 +2645,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns case edit_bpm: ScreenTextEntry::TextEntry( SM_BackFromBPMChange, - "Enter new BPM value.", + ENTER_BPM_VALUE, ssprintf( "%.4f", m_pSong->GetBPMAtBeat(GAMESTATE->m_fSongBeat) ), 10 ); @@ -2657,24 +2659,17 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns if( m_pSong->m_Timing.m_StopSegments[i].m_iStartRow == BeatToNoteRow(GAMESTATE->m_fSongBeat) ) break; } + + float fStopSeconds = 0; if ( i == m_pSong->m_Timing.m_StopSegments.size() ) - { - ScreenTextEntry::TextEntry( - SM_BackFromStopChange, - "Enter new Stop value.", - "0.00", - 10 - ); - } - else - { - ScreenTextEntry::TextEntry( - SM_BackFromStopChange, - "Enter new Stop value.", - ssprintf( "%.4f", m_pSong->m_Timing.m_StopSegments[i].m_fStopSeconds ), - 10 - ); - } + fStopSeconds = m_pSong->m_Timing.m_StopSegments[i].m_fStopSeconds; + + ScreenTextEntry::TextEntry( + SM_BackFromStopChange, + ENTER_STOP_VALUE, + ssprintf( "%.4f", fStopSeconds ), + 10 + ); break; } case play_preview_music: @@ -3019,6 +3014,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector &iAns CheckNumberOfNotesAndUndo(); } +static LocalizedString ENTER_NEW_DESCRIPTION( "ScreenEdit", "Enter a new description." ); void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const vector &iAnswers ) { Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; @@ -3032,7 +3028,7 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v case description: ScreenTextEntry::TextEntry( SM_None, - "Enter a description.", + ENTER_NEW_DESCRIPTION, m_pSteps->GetDescription(), (dc == DIFFICULTY_EDIT) ? MAX_EDIT_STEPS_DESCRIPTION_LENGTH : 255, NULL, @@ -3043,6 +3039,13 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v } } +static LocalizedString ENTER_MAIN_TITLE ("ScreenEdit","Enter a new main title."); +static LocalizedString ENTER_SUB_TITLE ("ScreenEdit","Enter a new sub title."); +static LocalizedString ENTER_ARTIST ("ScreenEdit","Enter a new artist."); +static LocalizedString ENTER_CREDIT ("ScreenEdit","Enter a new credit."); +static LocalizedString ENTER_MAIN_TITLE_TRANSLIT ("ScreenEdit","Enter a new main title transliteration."); +static LocalizedString ENTER_SUB_TITLE_TRANSLIT ("ScreenEdit","Enter a new sub title transliteration."); +static LocalizedString ENTER_ARTIST_TRANSLIT ("ScreenEdit","Enter a new artist transliteration."); void ScreenEdit::HandleSongInformationChoice( SongInformationChoice c, const vector &iAnswers ) { Song* pSong = GAMESTATE->m_pCurSong; @@ -3050,25 +3053,25 @@ void ScreenEdit::HandleSongInformationChoice( SongInformationChoice c, const vec switch( c ) { case main_title: - ScreenTextEntry::TextEntry( SM_None, "Edit main title.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sMainTitle, 100, NULL, ChangeMainTitle, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_MAIN_TITLE, pSong->m_sMainTitle, 100, NULL, ChangeMainTitle, NULL ); break; case sub_title: - ScreenTextEntry::TextEntry( SM_None, "Edit sub title.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sSubTitle, 100, NULL, ChangeSubTitle, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_SUB_TITLE, pSong->m_sSubTitle, 100, NULL, ChangeSubTitle, NULL ); break; case artist: - ScreenTextEntry::TextEntry( SM_None, "Edit artist.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sArtist, 100, NULL, ChangeArtist, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_ARTIST, pSong->m_sArtist, 100, NULL, ChangeArtist, NULL ); break; case credit: - ScreenTextEntry::TextEntry( SM_None, "Edit credit.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sCredit, 100, NULL, ChangeCredit, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_CREDIT, pSong->m_sCredit, 100, NULL, ChangeCredit, NULL ); break; case main_title_transliteration: - ScreenTextEntry::TextEntry( SM_None, "Edit main title transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sMainTitleTranslit, 100, NULL, ChangeMainTitleTranslit, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_MAIN_TITLE_TRANSLIT, pSong->m_sMainTitleTranslit, 100, NULL, ChangeMainTitleTranslit, NULL ); break; case sub_title_transliteration: - ScreenTextEntry::TextEntry( SM_None, "Edit sub title transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sSubTitleTranslit, 100, NULL, ChangeSubTitleTranslit, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_SUB_TITLE_TRANSLIT, pSong->m_sSubTitleTranslit, 100, NULL, ChangeSubTitleTranslit, NULL ); break; case artist_transliteration: - ScreenTextEntry::TextEntry( SM_None, "Edit artist transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sArtistTranslit, 100, NULL, ChangeArtistTranslit, NULL ); + ScreenTextEntry::TextEntry( SM_None, ENTER_ARTIST_TRANSLIT, pSong->m_sArtistTranslit, 100, NULL, ChangeArtistTranslit, NULL ); break; default: ASSERT(0); diff --git a/stepmania/src/ScreenEditMenu.cpp b/stepmania/src/ScreenEditMenu.cpp index b8770d6016..93ab7bf517 100644 --- a/stepmania/src/ScreenEditMenu.cpp +++ b/stepmania/src/ScreenEditMenu.cpp @@ -174,9 +174,10 @@ static void DeleteCurrentSteps() GAMESTATE->m_pCurSteps[0].Set( NULL ); } -static LocalizedString MISSING_MUSIC_FILE ( "ScreenEditMenu", "This song is missing a music file and cannot be edited." ); -static LocalizedString STEPS_WILL_BE_LOST ( "ScreenEditMenu", "These steps will be lost permanently." ); -static LocalizedString CONTINUE_WITH_DELETE ( "ScreenEditMenu", "Continue with delete?" ); +static LocalizedString MISSING_MUSIC_FILE ( "ScreenEditMenu", "This song is missing a music file and cannot be edited." ); +static LocalizedString STEPS_WILL_BE_LOST ( "ScreenEditMenu", "These steps will be lost permanently." ); +static LocalizedString CONTINUE_WITH_DELETE ( "ScreenEditMenu", "Continue with delete?" ); +static LocalizedString ENTER_EDIT_DESCRIPTION ( "ScreenEditMenu", "Enter a description for this edit."); void ScreenEditMenu::MenuStart( PlayerNumber pn ) { if( IsTransitioning() ) @@ -290,7 +291,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) { ScreenTextEntry::TextEntry( SM_BackFromEditDescription, - "Name the new edit.", + ENTER_EDIT_DESCRIPTION, GAMESTATE->m_pCurSteps[0]->GetDescription(), MAX_EDIT_STEPS_DESCRIPTION_LENGTH, ValidateCurrentStepsDescription, diff --git a/stepmania/src/ScreenNetRoom.cpp b/stepmania/src/ScreenNetRoom.cpp index 8fab115fc1..86ce9086fd 100644 --- a/stepmania/src/ScreenNetRoom.cpp +++ b/stepmania/src/ScreenNetRoom.cpp @@ -75,6 +75,7 @@ void ScreenNetRoom::Input( const InputEventPlus &input ) ScreenNetSelectBase::Input( input ); } +static LocalizedString ENTER_ROOM_DESCRIPTION ("ScreenNetRoom","Enter a description for the room:"); void ScreenNetRoom::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_GoToPrevScreen ) @@ -133,7 +134,7 @@ void ScreenNetRoom::HandleScreenMessage( const ScreenMessage SM ) if ( !ScreenTextEntry::s_bCancelledLast ) { m_newRoomName = ScreenTextEntry::s_sLastAnswer; - ScreenTextEntry::TextEntry( SM_BackFromRoomDesc, "Enter Room Description:", "", 255 ); + ScreenTextEntry::TextEntry( SM_BackFromRoomDesc, ENTER_ROOM_DESCRIPTION, "", 255 ); } } else if( SM == SM_BackFromRoomDesc ) diff --git a/stepmania/src/ScreenNetworkOptions.cpp b/stepmania/src/ScreenNetworkOptions.cpp index 725921f86a..89f2a20e26 100644 --- a/stepmania/src/ScreenNetworkOptions.cpp +++ b/stepmania/src/ScreenNetworkOptions.cpp @@ -128,8 +128,11 @@ void ScreenNetworkOptions::HandleScreenMessage( const ScreenMessage SM ) ScreenOptions::HandleScreenMessage( SM ); } -static LocalizedString DISCONNECTED ( "ScreenNetworkOptions", "Disconnected from server." ); -static LocalizedString SERVER_STOPPED ( "ScreenNetworkOptions", "Server stopped." ); +static LocalizedString DISCONNECTED ( "ScreenNetworkOptions", "Disconnected from server." ); +static LocalizedString SERVER_STOPPED ( "ScreenNetworkOptions", "Server stopped." ); +static LocalizedString ENTER_NETWORK_ADDRESS ("ScreenNetworkOptions","Enter a network address."); +static LocalizedString CONNECT_TO_YOURSELF ("ScreenNetworkOptions","Use 127.0.0.1 to connect to yourself."); +static LocalizedString ENTER_A_SERVER_NAME ("ScreenNetworkOptions","Enter a server name."); void ScreenNetworkOptions::MenuStart( const InputEventPlus &input ) { #if defined( WITHOUT_NETWORKING ) @@ -139,7 +142,7 @@ void ScreenNetworkOptions::MenuStart( const InputEventPlus &input ) case PO_CONNECTION: if ( !NSMAN->useSMserver ) { - ScreenTextEntry::TextEntry( SM_DoneConnecting, "Enter a Network Address\n127.0.0.1 to connect to yourself", g_sLastServer, 128 ); + ScreenTextEntry::TextEntry( SM_DoneConnecting, ENTER_NETWORK_ADDRESS.GetValue()+"\n\n"+CONNECT_TO_YOURSELF.GetValue(), g_sLastServer, 128 ); } else { @@ -154,7 +157,7 @@ void ScreenNetworkOptions::MenuStart( const InputEventPlus &input ) case NO_START_SERVER: if (!NSMAN->isLanServer) { - ScreenTextEntry::TextEntry( SM_ServerNameEnter, "Enter a server name...", "", 128); + ScreenTextEntry::TextEntry( SM_ServerNameEnter, ENTER_A_SERVER_NAME, "", 128); } break; case NO_STOP_SERVER: diff --git a/stepmania/src/ScreenOptionsManageCourses.cpp b/stepmania/src/ScreenOptionsManageCourses.cpp index 0377941554..a436d305dc 100644 --- a/stepmania/src/ScreenOptionsManageCourses.cpp +++ b/stepmania/src/ScreenOptionsManageCourses.cpp @@ -234,8 +234,9 @@ void ScreenOptionsManageCourses::BeginScreen() AfterChangeRow( PLAYER_1 ); } -static LocalizedString COURSE_WILL_BE_LOST("ScreenOptionsManageCourses", "This course will be lost permanently."); -static LocalizedString CONTINUE_WITH_DELETE("ScreenOptionsManageCourses", "Continue with delete?"); +static LocalizedString COURSE_WILL_BE_LOST ("ScreenOptionsManageCourses", "This course will be lost permanently."); +static LocalizedString CONTINUE_WITH_DELETE ("ScreenOptionsManageCourses", "Continue with delete?"); +static LocalizedString ENTER_COURSE_NAME ("ScreenOptionsManageCourses", "Enter a name for the course."); void ScreenOptionsManageCourses::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_Success ) @@ -312,7 +313,7 @@ void ScreenOptionsManageCourses::HandleScreenMessage( const ScreenMessage SM ) { ScreenTextEntry::TextEntry( SM_BackFromRename, - "Enter a name for the course.", + ENTER_COURSE_NAME, GAMESTATE->m_pCurCourse->GetDisplayFullTitle(), MAX_EDIT_COURSE_TITLE_LENGTH, ValidateEditCourseName ); @@ -374,7 +375,7 @@ void ScreenOptionsManageCourses::ProcessMenuStart( const InputEventPlus &input ) } ScreenTextEntry::TextEntry( SM_BackFromEnterNameForNew, - "Enter a name for the new course.", + ENTER_COURSE_NAME, sDefaultName, MAX_EDIT_COURSE_TITLE_LENGTH, ValidateEditCourseName ); diff --git a/stepmania/src/ScreenOptionsManageEditSteps.cpp b/stepmania/src/ScreenOptionsManageEditSteps.cpp index b27848b19d..03cf3eba77 100644 --- a/stepmania/src/ScreenOptionsManageEditSteps.cpp +++ b/stepmania/src/ScreenOptionsManageEditSteps.cpp @@ -131,6 +131,7 @@ void ScreenOptionsManageEditSteps::BeginScreen() static LocalizedString THESE_STEPS_WILL_BE_LOST ("ScreenOptionsManageEditSteps", "These steps will be lost permanently."); static LocalizedString CONTINUE_WITH_DELETE ("ScreenOptionsManageEditSteps", "Continue with delete?"); +static LocalizedString ENTER_NAME_FOR_STEPS ("ScreenOptionsManageEditSteps", "Enter a name for these steps."); void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_GoToNextScreen ) @@ -200,7 +201,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM ) { ScreenTextEntry::TextEntry( SM_BackFromRename, - "Enter a name for the Steps.", + ENTER_NAME_FOR_STEPS, GAMESTATE->m_pCurSteps[PLAYER_1]->GetDescription(), MAX_EDIT_STEPS_DESCRIPTION_LENGTH, ValidateEditStepsDescription ); diff --git a/stepmania/src/ScreenOptionsManageProfiles.cpp b/stepmania/src/ScreenOptionsManageProfiles.cpp index d79a7ee9e9..33a59a52de 100644 --- a/stepmania/src/ScreenOptionsManageProfiles.cpp +++ b/stepmania/src/ScreenOptionsManageProfiles.cpp @@ -167,8 +167,9 @@ void ScreenOptionsManageProfiles::BeginScreen() AfterChangeRow( PLAYER_1 ); } -static LocalizedString CONFIRM_DELETE_PROFILE( "ScreenOptionsManageProfiles", "Are you sure you want to delete the profile '%s'?" ); -static LocalizedString CONFIRM_CLEAR_PROFILE( "ScreenOptionsManageProfiles", "Are you sure you want to clear all data in the profile '%s'?" ); +static LocalizedString CONFIRM_DELETE_PROFILE ( "ScreenOptionsManageProfiles", "Are you sure you want to delete the profile '%s'?" ); +static LocalizedString CONFIRM_CLEAR_PROFILE ( "ScreenOptionsManageProfiles", "Are you sure you want to clear all data in the profile '%s'?" ); +static LocalizedString ENTER_PROFILE_NAME ( "ScreenOptionsManageProfiles", "Enter a name for the profile." ); void ScreenOptionsManageProfiles::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_GoToNextScreen ) @@ -274,7 +275,7 @@ void ScreenOptionsManageProfiles::HandleScreenMessage( const ScreenMessage SM ) { ScreenTextEntry::TextEntry( SM_BackFromRename, - "Enter a name for the profile.", + ENTER_PROFILE_NAME, pProfile->m_sDisplayName, PROFILE_MAX_DISPLAY_NAME_LENGTH, ValidateLocalProfileName ); @@ -328,7 +329,7 @@ void ScreenOptionsManageProfiles::ProcessMenuStart( const InputEventPlus &input } ScreenTextEntry::TextEntry( SM_BackFromEnterNameForNew, - "Enter a name for the new profile.", + ENTER_PROFILE_NAME, sPotentialName, PROFILE_MAX_DISPLAY_NAME_LENGTH, ValidateLocalProfileName ); diff --git a/stepmania/src/ScreenPackages.cpp b/stepmania/src/ScreenPackages.cpp index 440e71b5e5..91787fee19 100644 --- a/stepmania/src/ScreenPackages.cpp +++ b/stepmania/src/ScreenPackages.cpp @@ -159,12 +159,13 @@ void ScreenPackages::Update( float fDeltaTime ) ScreenWithMenuElements::Update(fDeltaTime); } +static LocalizedString ENTER_URL ("ScreenPackages","Enter URL"); void ScreenPackages::MenuStart( PlayerNumber pn ) { if ( m_iDLorLST == 1 ) { if ( m_iLinksPos == 0 ) - ScreenTextEntry::TextEntry( SM_BackFromURL, "Enter URL:", "http://", 255 ); + ScreenTextEntry::TextEntry( SM_BackFromURL, ENTER_URL, "http://", 255 ); else EnterURL( m_Links[m_iLinksPos] ); } diff --git a/stepmania/src/ScreenSMOnlineLogin.cpp b/stepmania/src/ScreenSMOnlineLogin.cpp index 473dd3bcf3..4dbb6cb5bd 100644 --- a/stepmania/src/ScreenSMOnlineLogin.cpp +++ b/stepmania/src/ScreenSMOnlineLogin.cpp @@ -93,9 +93,14 @@ void ScreenSMOnlineLogin::ExportOptions( int iRow, const vector &v } } -static LocalizedString UNIQUE_PROFILE( "ScreenSMOnlineLogin", "Each player needs a unique Profile." ); +static LocalizedString UNIQUE_PROFILE ( "ScreenSMOnlineLogin", "Each player needs a unique Profile." ); +static LocalizedString YOU_ARE_LOGGING_ON_AS ( "ScreenSMOnlineLogin", "You are logging on as:" ); +static LocalizedString ENTER_YOUR_PASSWORD ( "ScreenSMOnlineLogin", "Enter your password." ); + void ScreenSMOnlineLogin::HandleScreenMessage(const ScreenMessage SM) { + CString sLoginQuestion = YOU_ARE_LOGGING_ON_AS.GetValue()+"\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\n"+ENTER_YOUR_PASSWORD.GetValue(); + if( SM == SM_PasswordDone ) { if(!ScreenTextEntry::s_bCancelledLast) @@ -114,7 +119,9 @@ void ScreenSMOnlineLogin::HandleScreenMessage(const ScreenMessage SM) NSMAN->isSMOLoggedIn[m_iPlayer] = true; m_iPlayer++; if( GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer) && m_iPlayer < NUM_PLAYERS ) - ScreenTextEntry::Password(SM_PasswordDone, "You are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); + { + ScreenTextEntry::Password(SM_PasswordDone, sLoginQuestion, NULL ); + } else { SCREENMAN->SetNewScreen( THEME->GetMetric (m_sName,"NextScreen") ); @@ -123,7 +130,7 @@ void ScreenSMOnlineLogin::HandleScreenMessage(const ScreenMessage SM) else { CString Responce = NSMAN->m_SMOnlinePacket.ReadNT(); - ScreenTextEntry::Password( SM_PasswordDone, Responce + "\n\nYou are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); + ScreenTextEntry::Password( SM_PasswordDone, Responce + "\n\n"+sLoginQuestion, NULL ); } } } @@ -151,7 +158,7 @@ void ScreenSMOnlineLogin::HandleScreenMessage(const ScreenMessage SM) m_iPlayer=0; while(!GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer)) ++m_iPlayer; - ScreenTextEntry::Password(SM_PasswordDone, "You are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); + ScreenTextEntry::Password(SM_PasswordDone, sLoginQuestion, NULL ); } return; }