Implement preview music properly as a new optional tag in the ssc file. Changed ScreenManager to emit an error instead of asserting if a screen attempts to use SetNewScreen inside an InitCommand. Changed decorations layer to be a proper child instead of stripping away the ActorFrame.

This commit is contained in:
Kyzentun
2015-03-04 01:31:02 -07:00
parent 519ad8d243
commit 0318f07d2d
16 changed files with 88 additions and 30 deletions
+6 -1
View File
@@ -742,7 +742,12 @@ void ScreenManager::LoadDelayedScreen()
// Screens may not call SetNewScreen from the ctor or Init(). (We don't do this
// check inside PrepareScreen; that may be called from a thread for concurrent
// loading, and the main thread may call SetNewScreen during that time.)
ASSERT_M( m_sDelayedScreen.empty(), m_sDelayedScreen );
// Emit an error instead of asserting. -Kyz
if(!m_sDelayedScreen.empty())
{
LuaHelpers::ReportScriptError("Setting a new screen during an InitCommand is not allowed.");
m_sDelayedScreen= "";
}
bLoaded = ActivatePreparedScreenAndBackground( sScreenName );
ASSERT( bLoaded );