move attribute loading into the class that owns the attribute

This commit is contained in:
Chris Danford
2005-01-16 23:40:21 +00:00
parent 7b43001220
commit 8a1fb93003
8 changed files with 84 additions and 56 deletions
+20
View File
@@ -2,6 +2,8 @@
#include "ActorFrame.h"
#include "arch/Dialog/Dialog.h"
#include "RageUtil.h"
#include "XmlFile.h"
#include "ActorUtil.h"
ActorFrame::ActorFrame()
{
@@ -15,6 +17,24 @@ ActorFrame::~ActorFrame()
DeleteAllChildren();
}
void ActorFrame::LoadFromNode( const CString &sDir, const XNode* pNode )
{
Actor::LoadFromNode( pNode );
//
// Load children
//
const XNode* pChildren = pNode->GetChild("children");
if( pChildren )
{
FOREACH_CONST_Child( pChildren, pChild )
{
Actor* pChildActor = LoadFromActorFile( sDir, *pChild );
AddChild( pChildActor );
}
}
}
void ActorFrame::AddChild( Actor* pActor )
{
#if _DEBUG