ScreenTextEntry::TextEntry/ScreenTextEntry::Password

This commit is contained in:
Glenn Maynard
2005-07-03 04:45:34 +00:00
parent ea97ec6095
commit 9b08148f60
9 changed files with 25 additions and 26 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
#include "RoomWheel.h" #include "RoomWheel.h"
#include "RageLog.h" #include "RageLog.h"
#include "RageUtil.h" #include "RageUtil.h"
#include "ScreenManager.h" #include "ScreenTextEntry.h"
AutoScreenMessage( SM_BackFromRoomName ) 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. // Since this is not actually an option outside of this wheel NULL is a good idea.
m_LastSelection = NULL; m_LastSelection = NULL;
SCREENMAN->TextEntry( SM_BackFromRoomName, "Enter Room Name:", "", 255 ); ScreenTextEntry::TextEntry( SM_BackFromRoomName, "Enter Room Name:", "", 255 );
} }
return false; return false;
} }
+11 -11
View File
@@ -2086,7 +2086,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
} }
break; break;
case edit_bpm: case edit_bpm:
SCREENMAN->TextEntry( ScreenTextEntry::TextEntry(
SM_BackFromBPMChange, SM_BackFromBPMChange,
"Enter new BPM value.", "Enter new BPM value.",
ssprintf( "%.4f", m_pSong->GetBPMAtBeat(GAMESTATE->m_fSongBeat) ), ssprintf( "%.4f", m_pSong->GetBPMAtBeat(GAMESTATE->m_fSongBeat) ),
@@ -2104,7 +2104,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
} }
if ( i == m_pSong->m_Timing.m_StopSegments.size() ) if ( i == m_pSong->m_Timing.m_StopSegments.size() )
{ {
SCREENMAN->TextEntry( ScreenTextEntry::TextEntry(
SM_BackFromStopChange, SM_BackFromStopChange,
"Enter new Stop value.", "Enter new Stop value.",
"0.00", "0.00",
@@ -2113,7 +2113,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
} }
else else
{ {
SCREENMAN->TextEntry( ScreenTextEntry::TextEntry(
SM_BackFromStopChange, SM_BackFromStopChange,
"Enter new Stop value.", "Enter new Stop value.",
ssprintf( "%.4f", m_pSong->m_Timing.m_StopSegments[i].m_fStopSeconds ), ssprintf( "%.4f", m_pSong->m_Timing.m_StopSegments[i].m_fStopSeconds ),
@@ -2675,7 +2675,7 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v
switch( c ) switch( c )
{ {
case description: case description:
SCREENMAN->TextEntry( ScreenTextEntry::TextEntry(
SM_None, SM_None,
"Enter a description.", "Enter a description.",
m_pSteps->GetDescription(), m_pSteps->GetDescription(),
@@ -2695,25 +2695,25 @@ void ScreenEdit::HandleSongInformationChoice( SongInformationChoice c, const vec
switch( c ) switch( c )
{ {
case main_title: 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; break;
case sub_title: 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; break;
case artist: 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; break;
case credit: 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; break;
case main_title_transliteration: 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; break;
case sub_title_transliteration: 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; break;
case artist_transliteration: 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; break;
default: default:
ASSERT(0); ASSERT(0);
+1 -1
View File
@@ -291,7 +291,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
bool bPromptToNameSteps = (action != EDIT_MENU_ACTION_EDIT && dc == DIFFICULTY_EDIT); bool bPromptToNameSteps = (action != EDIT_MENU_ACTION_EDIT && dc == DIFFICULTY_EDIT);
if( bPromptToNameSteps ) if( bPromptToNameSteps )
{ {
SCREENMAN->TextEntry( ScreenTextEntry::TextEntry(
SM_BackFromEditDescription, SM_BackFromEditDescription,
"Name the new edit.", "Name the new edit.",
GAMESTATE->m_pCurSteps[0]->GetDescription(), GAMESTATE->m_pCurSteps[0]->GetDescription(),
+1 -2
View File
@@ -7,7 +7,6 @@
#include "GameState.h" #include "GameState.h"
#include "ThemeManager.h" #include "ThemeManager.h"
#include "ScreenTextEntry.h" #include "ScreenTextEntry.h"
#include "ScreenManager.h"
#include "Command.h" #include "Command.h"
#include "WheelItemBase.h" #include "WheelItemBase.h"
#include "RageLog.h" #include "RageLog.h"
@@ -135,7 +134,7 @@ void ScreenNetRoom::HandleScreenMessage( const ScreenMessage SM )
if ( !ScreenTextEntry::s_bCancelledLast ) if ( !ScreenTextEntry::s_bCancelledLast )
{ {
m_newRoomName = ScreenTextEntry::s_sLastAnswer; 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 ) else if( SM == SM_BackFromRoomDesc )
+2 -2
View File
@@ -122,7 +122,7 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type
case PO_CONNECTION: case PO_CONNECTION:
if ( !NSMAN->useSMserver ) 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 else
{ {
@@ -137,7 +137,7 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type
case NO_START_SERVER: case NO_START_SERVER:
if (!NSMAN->isLanServer) if (!NSMAN->isLanServer)
{ {
SCREENMAN->TextEntry( SM_ServerNameEnter, "Enter a server name...", "", 0); ScreenTextEntry::TextEntry( SM_ServerNameEnter, "Enter a server name...", "", 0);
} }
break; break;
case NO_STOP_SERVER: case NO_STOP_SERVER:
+1 -1
View File
@@ -164,7 +164,7 @@ void ScreenPackages::MenuStart( PlayerNumber pn )
if ( m_iDLorLST == 1 ) if ( m_iDLorLST == 1 )
{ {
if ( m_iLinksPos == 0 ) if ( m_iLinksPos == 0 )
SCREENMAN->TextEntry( SM_BackFromURL, "Enter URL:", "http://", 255 ); ScreenTextEntry::TextEntry( SM_BackFromURL, "Enter URL:", "http://", 255 );
else else
EnterURL( m_Links[m_iLinksPos] ); EnterURL( m_Links[m_iLinksPos] );
} }
+2 -2
View File
@@ -188,7 +188,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type
switch( GetCurrentRow() ) switch( GetCurrentRow() )
{ {
case PO_CREATE_NEW: case PO_CREATE_NEW:
SCREENMAN->TextEntry( SM_DoneCreating, "Enter a profile name", "", 12 ); ScreenTextEntry::TextEntry( SM_DoneCreating, "Enter a profile name", "", 12 );
break; break;
case PO_DELETE_: case PO_DELETE_:
{ {
@@ -209,7 +209,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type
if( sProfileID=="" ) if( sProfileID=="" )
SCREENMAN->PlayInvalidSound(); SCREENMAN->PlayInvalidSound();
else 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; break;
} }
default: default:
+3 -3
View File
@@ -124,7 +124,7 @@ void ScreenSMOnlineLogin::GoToNextScreen()
m_iPlayer=0; m_iPlayer=0;
while(!GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer)) while(!GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer))
++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; NSMAN->isSMOLoggedIn[m_iPlayer] = true;
m_iPlayer++; m_iPlayer++;
if( GAMESTATE->IsPlayerEnabled((PlayerNumber) m_iPlayer) && m_iPlayer < NUM_PLAYERS ) 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 else
SCREENMAN->SetNewScreen(NEXT_SCREEN); SCREENMAN->SetNewScreen(NEXT_SCREEN);
} }
else else
{ {
CString Responce = NSMAN->m_SMOnlinePacket.ReadNT(); 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 );
} }
} }
} }
+2 -2
View File
@@ -2,7 +2,7 @@
#include "ScreenTestFonts.h" #include "ScreenTestFonts.h"
#include "FontManager.h" #include "FontManager.h"
#include "RageTextureManager.h" #include "RageTextureManager.h"
#include "ScreenManager.h" #include "ScreenTextEntry.h"
#include "GameConstantsAndTypes.h" #include "GameConstantsAndTypes.h"
#include "ScreenDimensions.h" #include "ScreenDimensions.h"
@@ -98,7 +98,7 @@ void ScreenTestFonts::Input( const DeviceInput& DeviceI, const InputEventType ty
case '`': if(curtext != CustomText) case '`': if(curtext != CustomText)
SetText(CustomText); SetText(CustomText);
else else
SCREENMAN->TextEntry( SM_ChangeText, "Edit text.", CustomText, 100, NULL, ChangeText, NULL); ScreenTextEntry::TextEntry( SM_ChangeText, "Edit text.", CustomText, 100, NULL, ChangeText, NULL);
break; break;
case '1': SetText("Waaai"); break; case '1': SetText("Waaai"); break;
case '2': SetText("WAAI &#9769;"); break; case '2': SetText("WAAI &#9769;"); break;