Пример #1
0
CButton* CButton::create(const char* pNormal, const char* pSelected, const char* pDisabled)
{
	CButton* pRet = new CButton();
	if( pRet && pRet->initWithFile(pNormal, pSelected, pDisabled) )
	{
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}
Пример #2
0
CButton* CButton::create()
{
	CButton* pRet = new CButton();
	if( pRet && pRet->init() )
	{
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}