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 -11
View File
@@ -79,17 +79,14 @@ void ScreenWithMenuElements::Init()
// decorations
{
AutoActor decorations;
decorations.LoadB( m_sName, "decorations" );
decorations->SetName("Decorations");
decorations->SetDrawOrder( DRAW_ORDER_DECORATIONS );
ActorFrame *pFrame = dynamic_cast<ActorFrame*>(static_cast<Actor*>(decorations));
m_Decorations.LoadB( m_sName, "decorations" );
m_Decorations->SetName("Decorations");
m_Decorations->SetDrawOrder( DRAW_ORDER_DECORATIONS );
ActorFrame *pFrame = dynamic_cast<ActorFrame*>(static_cast<Actor*>(m_Decorations));
if( pFrame )
{
m_vDecorations = pFrame->GetChildren();
FOREACH( Actor*, m_vDecorations, child )
this->AddChild( *child );
pFrame->RemoveAllChildren();
this->AddChild(m_Decorations);
LOAD_ALL_COMMANDS(m_Decorations);
}
}
@@ -167,8 +164,6 @@ ScreenWithMenuElements::~ScreenWithMenuElements()
if( m_MemoryCardDisplay[p] != NULL )
SAFE_DELETE( m_MemoryCardDisplay[p] );
}
FOREACH( Actor*, m_vDecorations, actor )
delete *actor;
}
void ScreenWithMenuElements::SetHelpText( RString s )