Implement ScreenMiniMenu with ScreenOptions

This commit is contained in:
Chris Danford
2005-03-20 06:41:56 +00:00
parent 48e6cb1a69
commit bbadc010f4
16 changed files with 534 additions and 745 deletions
+8 -2
View File
@@ -279,6 +279,8 @@ Screen* ScreenManager::MakeNewScreenInternal( const CString &sScreenName )
LOG->Trace( "Loaded '%s' ('%s') in %f", sScreenName.c_str(), sClassName.c_str(), t.GetDeltaTime());
this->ZeroNextUpdate();
return ret;
}
@@ -484,6 +486,7 @@ void ScreenManager::Prompt( ScreenMessage SM_SendWhenDone, const CString &sText,
// add the new state onto the back of the array
Screen *pNewScreen = new ScreenPrompt( sText, type, defaultAnswer, OnYes, OnNo, pCallbackData);
pNewScreen->Init();
this->ZeroNextUpdate();
SetFromNewScreen( pNewScreen, true );
m_MessageSendOnPop = SM_SendWhenDone;
@@ -497,6 +500,7 @@ void ScreenManager::TextEntry( ScreenMessage SM_SendWhenDone, CString sQuestion,
// add the new state onto the back of the array
Screen *pNewScreen = new ScreenTextEntry( "ScreenTextEntry", sQuestion, sInitialAnswer, OnOK, OnCancel );
pNewScreen->Init();
this->ZeroNextUpdate();
SetFromNewScreen( pNewScreen, true );
m_MessageSendOnPop = SM_SendWhenDone;
@@ -510,6 +514,7 @@ void ScreenManager::Password( ScreenMessage SM_SendWhenDone, const CString &sTex
// add the new state onto the back of the array
Screen *pNewScreen = new ScreenTextEntry( "ScreenTextEntry", sText, "", OnOK, OnCancel, true );
pNewScreen->Init();
this->ZeroNextUpdate();
SetFromNewScreen( pNewScreen, true );
m_MessageSendOnPop = SM_SendWhenDone;
@@ -521,8 +526,9 @@ void ScreenManager::MiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMessa
m_ScreenStack.back()->HandleScreenMessage( SM_LoseFocus );
// add the new state onto the back of the array
Screen *pNewScreen = new ScreenMiniMenu( pDef, SM_SendOnOK, SM_SendOnCancel );
pNewScreen->Init();
ScreenMiniMenu *pNewScreen = new ScreenMiniMenu( pDef->sClassName );
pNewScreen->Init( pDef, SM_SendOnOK, SM_SendOnCancel );
this->ZeroNextUpdate();
SetFromNewScreen( pNewScreen, true );
}