Exemple #1
0
CLayout* CLayout::create()
{
	CLayout* pRet = new CLayout();
	if( pRet && pRet->init() )
	{
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}
Exemple #2
0
CLayout* CLayout::create(const Size& tContentSize)
{
	CLayout* pRet = new CLayout();
	if( pRet && pRet->init() )
	{
		pRet->setContentSize(tContentSize);
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}