Calling SetNewScreen when not the top screen on the stack only replaces the

top screen.  This allows a screen to push a helper screen, which can then
enter an entirely separate set of helper screens before one pops back.
(For example, a screen could push ScreenServiceOptions to enter the options
menu, which then replaces itself with the various options menus, and finally
pops back to the original screen when the player backs out entirely.)  (Some
support is still missing to allow non-special-case use of this; coming soon ...)

However, in rare cases we want to kill all screens on the stack, regardless
of how many there are (operator menu).  Fix that case.
This commit is contained in:
Glenn Maynard
2005-07-26 03:08:03 +00:00
parent 32c3953726
commit 4bcf9fcbfd
3 changed files with 23 additions and 3 deletions
+2 -1
View File
@@ -38,6 +38,7 @@ public:
bool IsConcurrentlyLoading() const;
void PushScreen( Screen *pNewScreen, bool bDeleteWhenDone=false, ScreenMessage SendOnPop=SM_None );
void PopTopScreen( ScreenMessage SM );
void PopAllScreens();
Screen* MakeNewScreen( const CString &sName );
Screen *GetTopScreen();
@@ -81,7 +82,7 @@ private:
bool m_bZeroNextUpdate;
void LoadDelayedScreen();
ScreenMessage PopTopScreenInternal();
ScreenMessage PopTopScreenInternal( bool bSendLoseFocus = true );
// Keep these sounds always loaded, because they could be
// played at any time. We want to eliminate SOUND->PlayOnce