From 9b08148f60297ee2a7a47c8e02b04b85813a02c1 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 3 Jul 2005 04:45:34 +0000 Subject: [PATCH] ScreenTextEntry::TextEntry/ScreenTextEntry::Password --- stepmania/src/RoomWheel.cpp | 4 ++-- stepmania/src/ScreenEdit.cpp | 22 +++++++++++----------- stepmania/src/ScreenEditMenu.cpp | 2 +- stepmania/src/ScreenNetRoom.cpp | 3 +-- stepmania/src/ScreenNetworkOptions.cpp | 4 ++-- stepmania/src/ScreenPackages.cpp | 2 +- stepmania/src/ScreenProfileOptions.cpp | 4 ++-- stepmania/src/ScreenSMOnlineLogin.cpp | 6 +++--- stepmania/src/ScreenTestFonts.cpp | 4 ++-- 9 files changed, 25 insertions(+), 26 deletions(-) diff --git a/stepmania/src/RoomWheel.cpp b/stepmania/src/RoomWheel.cpp index 6d0ef9be2d..bbf57d6525 100644 --- a/stepmania/src/RoomWheel.cpp +++ b/stepmania/src/RoomWheel.cpp @@ -2,7 +2,7 @@ #include "RoomWheel.h" #include "RageLog.h" #include "RageUtil.h" -#include "ScreenManager.h" +#include "ScreenTextEntry.h" AutoScreenMessage( SM_BackFromRoomName ) @@ -89,7 +89,7 @@ bool RoomWheel::Select() { // Since this is not actually an option outside of this wheel NULL is a good idea. m_LastSelection = NULL; - SCREENMAN->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 a79bd7d751..a499013cd0 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2086,7 +2086,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns } break; case edit_bpm: - SCREENMAN->TextEntry( + ScreenTextEntry::TextEntry( SM_BackFromBPMChange, "Enter new BPM value.", ssprintf( "%.4f", m_pSong->GetBPMAtBeat(GAMESTATE->m_fSongBeat) ), @@ -2104,7 +2104,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns } if ( i == m_pSong->m_Timing.m_StopSegments.size() ) { - SCREENMAN->TextEntry( + ScreenTextEntry::TextEntry( SM_BackFromStopChange, "Enter new Stop value.", "0.00", @@ -2113,7 +2113,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns } else { - SCREENMAN->TextEntry( + ScreenTextEntry::TextEntry( SM_BackFromStopChange, "Enter new Stop value.", ssprintf( "%.4f", m_pSong->m_Timing.m_StopSegments[i].m_fStopSeconds ), @@ -2675,7 +2675,7 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v switch( c ) { case description: - SCREENMAN->TextEntry( + ScreenTextEntry::TextEntry( SM_None, "Enter a description.", m_pSteps->GetDescription(), @@ -2695,25 +2695,25 @@ void ScreenEdit::HandleSongInformationChoice( SongInformationChoice c, const vec switch( c ) { case main_title: - SCREENMAN->TextEntry( SM_None, "Edit main title.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sMainTitle, 100, NULL, ChangeMainTitle, NULL ); + ScreenTextEntry::TextEntry( SM_None, "Edit main title.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sMainTitle, 100, NULL, ChangeMainTitle, NULL ); break; case sub_title: - SCREENMAN->TextEntry( SM_None, "Edit sub title.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sSubTitle, 100, NULL, ChangeSubTitle, NULL ); + ScreenTextEntry::TextEntry( SM_None, "Edit sub title.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sSubTitle, 100, NULL, ChangeSubTitle, NULL ); break; case artist: - SCREENMAN->TextEntry( SM_None, "Edit artist.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sArtist, 100, NULL, ChangeArtist, NULL ); + ScreenTextEntry::TextEntry( SM_None, "Edit artist.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sArtist, 100, NULL, ChangeArtist, NULL ); break; case credit: - SCREENMAN->TextEntry( SM_None, "Edit credit.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sCredit, 100, NULL, ChangeCredit, NULL ); + ScreenTextEntry::TextEntry( SM_None, "Edit credit.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sCredit, 100, NULL, ChangeCredit, NULL ); break; case main_title_transliteration: - SCREENMAN->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, "Edit main title transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sMainTitleTranslit, 100, NULL, ChangeMainTitleTranslit, NULL ); break; case sub_title_transliteration: - SCREENMAN->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, "Edit sub title transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sSubTitleTranslit, 100, NULL, ChangeSubTitleTranslit, NULL ); break; case artist_transliteration: - SCREENMAN->TextEntry( SM_None, "Edit artist transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sArtistTranslit, 100, NULL, ChangeArtistTranslit, NULL ); + ScreenTextEntry::TextEntry( SM_None, "Edit artist transliteration.\nPress Enter to confirm,\nEscape to cancel.", pSong->m_sArtistTranslit, 100, NULL, ChangeArtistTranslit, NULL ); break; default: ASSERT(0); diff --git a/stepmania/src/ScreenEditMenu.cpp b/stepmania/src/ScreenEditMenu.cpp index 3626094f8f..f06a39c5a0 100644 --- a/stepmania/src/ScreenEditMenu.cpp +++ b/stepmania/src/ScreenEditMenu.cpp @@ -291,7 +291,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) bool bPromptToNameSteps = (action != EDIT_MENU_ACTION_EDIT && dc == DIFFICULTY_EDIT); if( bPromptToNameSteps ) { - SCREENMAN->TextEntry( + ScreenTextEntry::TextEntry( SM_BackFromEditDescription, "Name the new edit.", GAMESTATE->m_pCurSteps[0]->GetDescription(), diff --git a/stepmania/src/ScreenNetRoom.cpp b/stepmania/src/ScreenNetRoom.cpp index 33b38eff27..0e2b2a96ef 100644 --- a/stepmania/src/ScreenNetRoom.cpp +++ b/stepmania/src/ScreenNetRoom.cpp @@ -7,7 +7,6 @@ #include "GameState.h" #include "ThemeManager.h" #include "ScreenTextEntry.h" -#include "ScreenManager.h" #include "Command.h" #include "WheelItemBase.h" #include "RageLog.h" @@ -135,7 +134,7 @@ void ScreenNetRoom::HandleScreenMessage( const ScreenMessage SM ) if ( !ScreenTextEntry::s_bCancelledLast ) { m_newRoomName = ScreenTextEntry::s_sLastAnswer; - SCREENMAN->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 42bf788aaa..9c3728eb12 100644 --- a/stepmania/src/ScreenNetworkOptions.cpp +++ b/stepmania/src/ScreenNetworkOptions.cpp @@ -122,7 +122,7 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type case PO_CONNECTION: if ( !NSMAN->useSMserver ) { - SCREENMAN->TextEntry( SM_DoneConnecting, "Enter a Network Address\n127.0.0.1 to connect to yourself", g_sLastServer, 128 ); + ScreenTextEntry::TextEntry( SM_DoneConnecting, "Enter a Network Address\n127.0.0.1 to connect to yourself", g_sLastServer, 128 ); } else { @@ -137,7 +137,7 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type case NO_START_SERVER: if (!NSMAN->isLanServer) { - SCREENMAN->TextEntry( SM_ServerNameEnter, "Enter a server name...", "", 0); + ScreenTextEntry::TextEntry( SM_ServerNameEnter, "Enter a server name...", "", 0); } break; case NO_STOP_SERVER: diff --git a/stepmania/src/ScreenPackages.cpp b/stepmania/src/ScreenPackages.cpp index aa02d287a5..81c1ffac30 100644 --- a/stepmania/src/ScreenPackages.cpp +++ b/stepmania/src/ScreenPackages.cpp @@ -164,7 +164,7 @@ void ScreenPackages::MenuStart( PlayerNumber pn ) if ( m_iDLorLST == 1 ) { if ( m_iLinksPos == 0 ) - SCREENMAN->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/ScreenProfileOptions.cpp b/stepmania/src/ScreenProfileOptions.cpp index 6f61ac97f1..39e274870a 100644 --- a/stepmania/src/ScreenProfileOptions.cpp +++ b/stepmania/src/ScreenProfileOptions.cpp @@ -188,7 +188,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type switch( GetCurrentRow() ) { case PO_CREATE_NEW: - SCREENMAN->TextEntry( SM_DoneCreating, "Enter a profile name", "", 12 ); + ScreenTextEntry::TextEntry( SM_DoneCreating, "Enter a profile name", "", 12 ); break; case PO_DELETE_: { @@ -209,7 +209,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type if( sProfileID=="" ) SCREENMAN->PlayInvalidSound(); else - SCREENMAN->TextEntry( SM_DoneRenaming, ssprintf("Rename profile %s '%s'",sProfileID.c_str(),sName.c_str()), sName, 12 ); + ScreenTextEntry::TextEntry( SM_DoneRenaming, ssprintf("Rename profile %s '%s'",sProfileID.c_str(),sName.c_str()), sName, 12 ); break; } default: diff --git a/stepmania/src/ScreenSMOnlineLogin.cpp b/stepmania/src/ScreenSMOnlineLogin.cpp index a65cdd792a..3a2771d6d6 100644 --- a/stepmania/src/ScreenSMOnlineLogin.cpp +++ b/stepmania/src/ScreenSMOnlineLogin.cpp @@ -124,7 +124,7 @@ void ScreenSMOnlineLogin::GoToNextScreen() m_iPlayer=0; while(!GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer)) ++m_iPlayer; - SCREENMAN->Password(SM_PasswordDone, "You are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); + ScreenTextEntry::Password(SM_PasswordDone, "You are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); } } @@ -148,14 +148,14 @@ void ScreenSMOnlineLogin::HandleScreenMessage(const ScreenMessage SM) NSMAN->isSMOLoggedIn[m_iPlayer] = true; m_iPlayer++; if( GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer) && m_iPlayer < NUM_PLAYERS ) - SCREENMAN->Password(SM_PasswordDone, "You are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); + ScreenTextEntry::Password(SM_PasswordDone, "You are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); else SCREENMAN->SetNewScreen(NEXT_SCREEN); } else { CString Responce = NSMAN->m_SMOnlinePacket.ReadNT(); - SCREENMAN->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\nYou are logging on as:\n" + GAMESTATE->GetPlayerDisplayName((PlayerNumber) m_iPlayer) + "\n\nPlease enter your password.", NULL ); } } } diff --git a/stepmania/src/ScreenTestFonts.cpp b/stepmania/src/ScreenTestFonts.cpp index 25f34db8d8..d72cca3702 100644 --- a/stepmania/src/ScreenTestFonts.cpp +++ b/stepmania/src/ScreenTestFonts.cpp @@ -2,7 +2,7 @@ #include "ScreenTestFonts.h" #include "FontManager.h" #include "RageTextureManager.h" -#include "ScreenManager.h" +#include "ScreenTextEntry.h" #include "GameConstantsAndTypes.h" #include "ScreenDimensions.h" @@ -98,7 +98,7 @@ void ScreenTestFonts::Input( const DeviceInput& DeviceI, const InputEventType ty case '`': if(curtext != CustomText) SetText(CustomText); else - SCREENMAN->TextEntry( SM_ChangeText, "Edit text.", CustomText, 100, NULL, ChangeText, NULL); + ScreenTextEntry::TextEntry( SM_ChangeText, "Edit text.", CustomText, 100, NULL, ChangeText, NULL); break; case '1': SetText("Waaai"); break; case '2': SetText("WAAI ☩"); break;