as well as during load, set LoadingScreen during BeginScreen.
Scripts can already use GetTopScreen to get this. However, that function also returns data that may not be what's wanted. For example, commands can be run on screens that aren't on top (eg. via broadcasts). So, using GetTopScreen as a fallback for LoadingScreen may cause latent bugs; screens should behave properly even when they're not on top, even if they're using queued broadcasts to kick off animations, etc.
This commit is contained in:
@@ -121,8 +121,13 @@ namespace
|
||||
// Be sure to push the screen first, so GetTopScreen returns the screen
|
||||
// during BeginScreen.
|
||||
g_ScreenStack.push_back( ls );
|
||||
|
||||
/* Set the name of the loading screen. */
|
||||
ActorUtil::ActorParam LoadingScreen( "LoadingScreen", ls.m_pScreen->GetName() );
|
||||
ls.m_pScreen->BeginScreen();
|
||||
|
||||
LoadingScreen.Release();
|
||||
|
||||
SCREENMAN->RefreshCreditsMessages();
|
||||
|
||||
SCREENMAN->PostMessageToTopScreen( SM_GainFocus, 0 );
|
||||
|
||||
Reference in New Issue
Block a user