simplify
This commit is contained in:
@@ -71,7 +71,7 @@ public:
|
|||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
ScreenPrompt::Init();
|
ScreenPrompt::Init();
|
||||||
this->Load( SM_None, "These steps will be lost permanently.\n\nContinue with delete?", PROMPT_YES_NO, ANSWER_NO );
|
this->Load( "These steps will be lost permanently.\n\nContinue with delete?", PROMPT_YES_NO, ANSWER_NO );
|
||||||
}
|
}
|
||||||
|
|
||||||
void End( bool bCancelled )
|
void End( bool bCancelled )
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ void ScreenNetSelectMusic::MenuUp( PlayerNumber pn, const InputEventType type )
|
|||||||
{
|
{
|
||||||
NSMAN->ReportNSSOnOff(3);
|
NSMAN->ReportNSSOnOff(3);
|
||||||
GAMESTATE->m_EditMode = EDIT_MODE_FULL;
|
GAMESTATE->m_EditMode = EDIT_MODE_FULL;
|
||||||
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions" );
|
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromPlayerOptions );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNetSelectMusic::MenuDown( PlayerNumber pn, const InputEventType type )
|
void ScreenNetSelectMusic::MenuDown( PlayerNumber pn, const InputEventType type )
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ void ScreenPrompt::Prompt( ScreenMessage smSendOnPop, const CString &sText, Prom
|
|||||||
// add the new state onto the back of the array
|
// add the new state onto the back of the array
|
||||||
ScreenPrompt *pNewScreen = new ScreenPrompt( "ScreenPrompt" );
|
ScreenPrompt *pNewScreen = new ScreenPrompt( "ScreenPrompt" );
|
||||||
pNewScreen->Init();
|
pNewScreen->Init();
|
||||||
pNewScreen->Load( smSendOnPop, sText, type, defaultAnswer, OnYes, OnNo, pCallbackData );
|
pNewScreen->Load( sText, type, defaultAnswer, OnYes, OnNo, pCallbackData );
|
||||||
SCREENMAN->ZeroNextUpdate();
|
SCREENMAN->ZeroNextUpdate();
|
||||||
SCREENMAN->PushScreen( pNewScreen, true );
|
SCREENMAN->PushScreen( pNewScreen, true, smSendOnPop );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -54,7 +54,6 @@ void ScreenPrompt::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScreenPrompt::Load(
|
void ScreenPrompt::Load(
|
||||||
ScreenMessage smSendOnPop,
|
|
||||||
CString sText,
|
CString sText,
|
||||||
PromptType type,
|
PromptType type,
|
||||||
PromptAnswer defaultAnswer,
|
PromptAnswer defaultAnswer,
|
||||||
@@ -62,7 +61,6 @@ void ScreenPrompt::Load(
|
|||||||
void (*OnNo)(void*),
|
void (*OnNo)(void*),
|
||||||
void* pCallbackData )
|
void* pCallbackData )
|
||||||
{
|
{
|
||||||
m_smSendOnPop = smSendOnPop;
|
|
||||||
m_sText = sText;
|
m_sText = sText;
|
||||||
m_PromptType = type;
|
m_PromptType = type;
|
||||||
m_Answer = defaultAnswer;
|
m_Answer = defaultAnswer;
|
||||||
@@ -116,21 +114,6 @@ void ScreenPrompt::Input( const DeviceInput& DeviceI, const InputEventType type,
|
|||||||
ScreenWithMenuElements::Input( DeviceI, type, GameI, MenuI, StyleI );
|
ScreenWithMenuElements::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenPrompt::HandleScreenMessage( const ScreenMessage SM )
|
|
||||||
{
|
|
||||||
switch( SM )
|
|
||||||
{
|
|
||||||
case SM_GoToNextScreen:
|
|
||||||
if( SCREENMAN->IsStackedScreen(this) )
|
|
||||||
{
|
|
||||||
SCREENMAN->PopTopScreen( m_smSendOnPop );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ScreenWithMenuElements::HandleScreenMessage( SM );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenPrompt::Change( int dir )
|
void ScreenPrompt::Change( int dir )
|
||||||
{
|
{
|
||||||
m_textAnswer[m_Answer].SetEffectNone();
|
m_textAnswer[m_Answer].SetEffectNone();
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ public:
|
|||||||
ScreenPrompt( const CString &sScreenName );
|
ScreenPrompt( const CString &sScreenName );
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
void Load(
|
void Load(
|
||||||
ScreenMessage smSendOnPop,
|
|
||||||
CString sText,
|
CString sText,
|
||||||
PromptType type = PROMPT_OK,
|
PromptType type = PROMPT_OK,
|
||||||
PromptAnswer defaultAnswer = ANSWER_NO,
|
PromptAnswer defaultAnswer = ANSWER_NO,
|
||||||
@@ -43,7 +42,6 @@ public:
|
|||||||
void* pCallbackData = NULL
|
void* pCallbackData = NULL
|
||||||
);
|
);
|
||||||
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 PromptAnswer s_LastAnswer;
|
static PromptAnswer s_LastAnswer;
|
||||||
static bool s_bCancelledLast;
|
static bool s_bCancelledLast;
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ void ScreenSaveSync::Init()
|
|||||||
ScreenPrompt::Init();
|
ScreenPrompt::Init();
|
||||||
|
|
||||||
Load(
|
Load(
|
||||||
SM_None,
|
|
||||||
GetPromptText(),
|
GetPromptText(),
|
||||||
PROMPT_YES_NO,
|
PROMPT_YES_NO,
|
||||||
ANSWER_YES,
|
ANSWER_YES,
|
||||||
|
|||||||
Reference in New Issue
Block a user