/** * 创建 */ UITextButton* UITextButton::create(const char *text) { UITextButton *node = new UITextButton(); if (node) { node->_textUp = CCLabelTTF::create(text, "Arial", 12); node->_textDown = CCLabelTTF::create(text, "Arial", 16); if (node->_textUp && node->_textDown) { node->addChild(node->_textUp); node->addChild(node->_textDown ); node->_textUp->setVisible(true); node->_textDown->setVisible(false); // node->_textUp->retain(); // node->_textDown->retain(); node->autorelease(); return node; } } CC_SAFE_DELETE(node); return NULL; }