add GetChild

This commit is contained in:
Chris Danford
2005-03-01 21:55:47 +00:00
parent cb02171492
commit 1fd957fe9c
2 changed files with 23 additions and 0 deletions
+11
View File
@@ -8,6 +8,7 @@
#include "ActorCommands.h"
#include "RageDisplay.h"
#include "ScreenDimensions.h"
#include "Foreach.h"
// lua start
LUA_REGISTER_CLASS( ActorFrame )
@@ -89,6 +90,16 @@ void ActorFrame::RemoveChild( Actor* pActor )
m_SubActors.erase( iter );
}
Actor* ActorFrame::GetChild( const CString &sName )
{
FOREACH( Actor*, m_SubActors, a )
{
if( (*a)->GetName() == sName )
return *a;
}
return NULL;
}
void ActorFrame::RemoveAllChildren()
{
m_SubActors.clear();