Example #1
0
CTextRich* CTextRich::create()
{
	CTextRich* pRet = new CTextRich();
	if( pRet && pRet->init() )
	{
		pRet->autorelease();
		return pRet;
	}
	CC_SAFE_DELETE(pRet);
	return NULL;
}
Example #2
0
CTextRich* CTextRich::create()
{
	CTextRich* widget = new (std::nothrow) CTextRich();
	if (widget && widget->init())
	{
        widget->setTouchEnabled(true);
		widget->autorelease();
		return widget;
	}
	CC_SAFE_DELETE(widget);
	return nullptr;
}