pull ScreenPrompt init into a separate function, so it's slightly less of a special

case; maybe this class's instances can be made reusable ...
This commit is contained in:
Glenn Maynard
2005-07-03 03:49:19 +00:00
parent 5bdae4fa35
commit a49aecd774
5 changed files with 49 additions and 47 deletions
+2 -1
View File
@@ -459,8 +459,9 @@ void ScreenManager::Prompt( ScreenMessage smSendOnPop, const CString &sText, Pro
m_ScreenStack.back()->HandleScreenMessage( SM_LoseFocus );
// add the new state onto the back of the array
Screen *pNewScreen = new ScreenPrompt( "ScreenPrompt", smSendOnPop, sText, type, defaultAnswer, OnYes, OnNo, pCallbackData);
ScreenPrompt *pNewScreen = new ScreenPrompt( "ScreenPrompt" );
pNewScreen->Init();
pNewScreen->Load( smSendOnPop, sText, type, defaultAnswer, OnYes, OnNo, pCallbackData );
this->ZeroNextUpdate();
SetFromNewScreen( pNewScreen );
}