Exemple #1
0
CATextView* CATextView::createWithFrame(const CCRect& frame)
{
	CATextView *text = new CATextView();
	if (text && text->initWithFrame(frame))
	{
		text->autorelease();
		return text;
	}
	CC_SAFE_DELETE(text);
	return NULL;
}
Exemple #2
0
CATextView* CATextView::createWithFrame(const CCRect& rect)
{
	CATextView* pTextView = new CATextView();
	if (pTextView && pTextView->initWithFrame(rect))
	{
		pTextView->autorelease();
		return pTextView;
	}
	CC_SAFE_DELETE(pTextView);
	return NULL;
}