Beispiel #1
0
CATextView* CATextView::createWithCenter(const CCRect& rect)
{
	CATextView *text = new CATextView();
	if (text && text->initWithCenter(rect))
	{
		text->autorelease();
		return text;
	}
	CC_SAFE_DELETE(text);
	return NULL;
}
Beispiel #2
0
CATextView* CATextView::createWithCenter(const CCRect& rect)
{
	CATextView* pTextView = new CATextView();
	if (pTextView && pTextView->initWithCenter(rect))
	{
		pTextView->autorelease();
		return pTextView;
	}
	CC_SAFE_DELETE(pTextView);
	return NULL;
}