simplify
This commit is contained in:
@@ -52,7 +52,6 @@ void ScreenTextEntry::TextEntry(
|
|||||||
// add the new state onto the back of the array
|
// add the new state onto the back of the array
|
||||||
ScreenTextEntry *pNewScreen = new ScreenTextEntry(
|
ScreenTextEntry *pNewScreen = new ScreenTextEntry(
|
||||||
"ScreenTextEntry",
|
"ScreenTextEntry",
|
||||||
smSendOnPop,
|
|
||||||
sQuestion,
|
sQuestion,
|
||||||
sInitialAnswer,
|
sInitialAnswer,
|
||||||
iMaxInputLength,
|
iMaxInputLength,
|
||||||
@@ -62,7 +61,7 @@ void ScreenTextEntry::TextEntry(
|
|||||||
bPassword );
|
bPassword );
|
||||||
pNewScreen->Init();
|
pNewScreen->Init();
|
||||||
SCREENMAN->ZeroNextUpdate();
|
SCREENMAN->ZeroNextUpdate();
|
||||||
SCREENMAN->PushScreen( pNewScreen, true );
|
SCREENMAN->PushScreen( pNewScreen, true, smSendOnPop );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScreenTextEntry::s_bCancelledLast = false;
|
bool ScreenTextEntry::s_bCancelledLast = false;
|
||||||
@@ -78,7 +77,6 @@ bool ScreenTextEntry::s_bCancelledLast = false;
|
|||||||
|
|
||||||
ScreenTextEntry::ScreenTextEntry(
|
ScreenTextEntry::ScreenTextEntry(
|
||||||
CString sClassName,
|
CString sClassName,
|
||||||
ScreenMessage smSendOnPop,
|
|
||||||
CString sQuestion,
|
CString sQuestion,
|
||||||
CString sInitialAnswer,
|
CString sInitialAnswer,
|
||||||
int iMaxInputLength,
|
int iMaxInputLength,
|
||||||
@@ -90,7 +88,6 @@ ScreenTextEntry::ScreenTextEntry(
|
|||||||
{
|
{
|
||||||
m_bIsTransparent = true; // draw screens below us
|
m_bIsTransparent = true; // draw screens below us
|
||||||
|
|
||||||
m_smSendOnPop = smSendOnPop;
|
|
||||||
m_sQuestion = sQuestion;
|
m_sQuestion = sQuestion;
|
||||||
m_sAnswer = CStringToWstring( sInitialAnswer );
|
m_sAnswer = CStringToWstring( sInitialAnswer );
|
||||||
m_iMaxInputLength = iMaxInputLength;
|
m_iMaxInputLength = iMaxInputLength;
|
||||||
@@ -253,21 +250,6 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty
|
|||||||
ScreenWithMenuElements::Input( DeviceI, type, GameI, MenuI, StyleI );
|
ScreenWithMenuElements::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenTextEntry::HandleScreenMessage( const ScreenMessage SM )
|
|
||||||
{
|
|
||||||
switch( SM )
|
|
||||||
{
|
|
||||||
case SM_GoToNextScreen:
|
|
||||||
if( SCREENMAN->IsStackedScreen(this) )
|
|
||||||
{
|
|
||||||
SCREENMAN->PopTopScreen( m_smSendOnPop );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Screen::HandleScreenMessage( SM );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenTextEntry::MoveX( int iDir )
|
void ScreenTextEntry::MoveX( int iDir )
|
||||||
{
|
{
|
||||||
CString sKey;
|
CString sKey;
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public:
|
|||||||
|
|
||||||
ScreenTextEntry(
|
ScreenTextEntry(
|
||||||
CString sName,
|
CString sName,
|
||||||
ScreenMessage smSendOnPop,
|
|
||||||
CString sQuestion,
|
CString sQuestion,
|
||||||
CString sInitialAnswer,
|
CString sInitialAnswer,
|
||||||
int iMaxInputLength,
|
int iMaxInputLength,
|
||||||
@@ -59,7 +58,6 @@ public:
|
|||||||
virtual void Init();
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
|
||||||
|
|
||||||
static CString s_sLastAnswer;
|
static CString s_sLastAnswer;
|
||||||
static bool s_bCancelledLast;
|
static bool s_bCancelledLast;
|
||||||
@@ -83,7 +81,6 @@ protected:
|
|||||||
void UpdateKeyboardText();
|
void UpdateKeyboardText();
|
||||||
void UpdateAnswerText();
|
void UpdateAnswerText();
|
||||||
|
|
||||||
ScreenMessage m_smSendOnPop;
|
|
||||||
CString m_sQuestion;
|
CString m_sQuestion;
|
||||||
int m_iMaxInputLength;
|
int m_iMaxInputLength;
|
||||||
bool m_bPassword;
|
bool m_bPassword;
|
||||||
|
|||||||
Reference in New Issue
Block a user