Changed decorations layer back to being a frame that is stripped of its actors. According to ancient commit logs, it was like that to allow controlling the draworder of decorations relative to other screen children.

This commit is contained in:
Kyzentun
2015-03-04 21:24:33 -07:00
parent 46d215aed3
commit 05fb09323e
2 changed files with 12 additions and 7 deletions
+11 -6
View File
@@ -79,14 +79,17 @@ void ScreenWithMenuElements::Init()
// 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));
AutoActor decorations;
decorations.LoadB( m_sName, "decorations" );
decorations->SetName("Decorations");
decorations->SetDrawOrder( DRAW_ORDER_DECORATIONS );
ActorFrame *pFrame = dynamic_cast<ActorFrame*>(static_cast<Actor*>(decorations));
if( pFrame )
{
this->AddChild(m_Decorations);
LOAD_ALL_COMMANDS(m_Decorations);
m_vDecorations = pFrame->GetChildren();
FOREACH( Actor*, m_vDecorations, child )
this->AddChild( *child );
pFrame->RemoveAllChildren();
}
}
@@ -164,6 +167,8 @@ ScreenWithMenuElements::~ScreenWithMenuElements()
if( m_MemoryCardDisplay[p] != NULL )
SAFE_DELETE( m_MemoryCardDisplay[p] );
}
FOREACH( Actor*, m_vDecorations, actor )
delete *actor;
}
void ScreenWithMenuElements::SetHelpText( RString s )