Example #1
0
Controls::Base* Base::FindChildByName( const Gwen::String& name, bool bRecursive )
{
	Base::List::iterator iter;
	for (iter = Children.begin(); iter != Children.end(); ++iter)
	{
		Base* pChild = *iter;
		if ( pChild->GetName() == name )
			return pChild;

		if ( bRecursive )
		{
			Controls::Base* pSubChild = pChild->FindChildByName( name, true );

			if ( pSubChild )
				return pSubChild;
		}
	}

	return NULL;
}