CCLabelTTF * CCLabelTTF::create() { CCLabelTTF * pRet = new CCLabelTTF(); if (pRet && pRet->init()) { pRet->autorelease(); } else { CC_SAFE_DELETE(pRet); } return pRet; }
TTFFontInit::TTFFontInit() { CCSize s = CCDirector::sharedDirector()->getWinSize(); CCLabelTTF* font = new CCLabelTTF(); font->init(); font->autorelease(); font->setFontName("Marker Felt"); font->setFontSize(48); font->setString("It is working!"); this->addChild(font); font->setPosition(ccp(s.width/2,s.height/4*2)); }