Move LoadingScreen to a global.
LoadingScreen is a variable that should be available to all loading definitions. Param does this currently, but I'm redesigning that, and this particular case doesn't fit. Conceptually, it really is a global (though perhaps should be tucked away with an environment or something).
This commit is contained in:
@@ -18,9 +18,10 @@
|
|||||||
void Screen::InitScreen( Screen *pScreen )
|
void Screen::InitScreen( Screen *pScreen )
|
||||||
{
|
{
|
||||||
/* Set the name of the loading screen. */
|
/* Set the name of the loading screen. */
|
||||||
ActorUtil::ActorParam LoadingScreen( "LoadingScreen", pScreen->GetName() );
|
LUA->SetGlobal( "LoadingScreen", pScreen->GetName() );
|
||||||
|
|
||||||
pScreen->Init();
|
pScreen->Init();
|
||||||
|
LUA->UnsetGlobal( "LoadingScreen" );
|
||||||
}
|
}
|
||||||
|
|
||||||
Screen::~Screen()
|
Screen::~Screen()
|
||||||
|
|||||||
@@ -124,10 +124,9 @@ namespace ScreenManagerUtil
|
|||||||
g_ScreenStack.push_back( ls );
|
g_ScreenStack.push_back( ls );
|
||||||
|
|
||||||
/* Set the name of the loading screen. */
|
/* Set the name of the loading screen. */
|
||||||
ActorUtil::ActorParam LoadingScreen( "LoadingScreen", ls.m_pScreen->GetName() );
|
LUA->SetGlobal( "LoadingScreen", ls.m_pScreen->GetName() );
|
||||||
ls.m_pScreen->BeginScreen();
|
ls.m_pScreen->BeginScreen();
|
||||||
|
LUA->UnsetGlobal( "LoadingScreen" );
|
||||||
LoadingScreen.Release();
|
|
||||||
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user