This commit is contained in:
Glenn Maynard
2005-06-19 08:56:45 +00:00
parent a0dcb3dc81
commit bfc49737fe
+6 -6
View File
@@ -110,7 +110,7 @@ void ScreenManager::ThemeChanged()
void ScreenManager::EmptyDeleteQueue() void ScreenManager::EmptyDeleteQueue()
{ {
if(!m_vScreensToDelete.size()) if( !m_vScreensToDelete.size() )
return; return;
m_bZeroNextUpdate = true; m_bZeroNextUpdate = true;
@@ -144,9 +144,8 @@ bool ScreenManager::IsStackedScreen( const Screen *pScreen ) const
void ScreenManager::Update( float fDeltaTime ) void ScreenManager::Update( float fDeltaTime )
{ {
// Only update the topmost screen on the stack. /*
* Screens take some time to load. If we don't do this, then screens
/* Screens take some time to load. If we don't do this, then screens
* receive an initial update that includes all of the time they spent * receive an initial update that includes all of the time they spent
* loading, which will chop off their tweens. * loading, which will chop off their tweens.
* *
@@ -175,6 +174,7 @@ void ScreenManager::Update( float fDeltaTime )
m_bZeroNextUpdate = false; m_bZeroNextUpdate = false;
} }
// Only update the topmost screen on the stack.
if( pScreen ) if( pScreen )
pScreen->Update( fDeltaTime ); pScreen->Update( fDeltaTime );
@@ -355,7 +355,7 @@ void ScreenManager::ClearScreenStack()
m_ScreenStack.back()->HandleScreenMessage( SM_LoseFocus ); m_ScreenStack.back()->HandleScreenMessage( SM_LoseFocus );
// move current screen(s) to ScreenToDelete // move current screen(s) to ScreenToDelete
m_vScreensToDelete.insert(m_vScreensToDelete.end(), m_ScreenStack.begin(), m_ScreenStack.end()); m_vScreensToDelete.insert( m_vScreensToDelete.end(), m_ScreenStack.begin(), m_ScreenStack.end() );
m_ScreenStack.clear(); m_ScreenStack.clear();
} }
@@ -524,7 +524,7 @@ void ScreenManager::PopTopScreen( ScreenMessage SM )
Screen* pScreenToPop = m_ScreenStack.back(); // top menu Screen* pScreenToPop = m_ScreenStack.back(); // top menu
pScreenToPop->HandleScreenMessage( SM_LoseFocus ); pScreenToPop->HandleScreenMessage( SM_LoseFocus );
m_ScreenStack.erase(m_ScreenStack.end()-1, m_ScreenStack.end()); m_ScreenStack.erase( m_ScreenStack.end()-1, m_ScreenStack.end() );
m_vScreensToDelete.push_back( pScreenToPop ); m_vScreensToDelete.push_back( pScreenToPop );
/* Post to the new top. This must be done now; otherwise, we'll have a single /* Post to the new top. This must be done now; otherwise, we'll have a single