ControlButton* ControlButton::create(Scale9Sprite* sprite) { ControlButton *pRet = new ControlButton(); pRet->initWithBackgroundSprite(sprite); pRet->autorelease(); return pRet; }
ControlButton* ControlButton::create(Node* label, Scale9Sprite* backgroundSprite) { ControlButton *pRet = new ControlButton(); pRet->initWithLabelAndBackgroundSprite(label, backgroundSprite); pRet->autorelease(); return pRet; }
ControlButton* ControlButton::create(string title, const char * fontName, float fontSize) { ControlButton *pRet = new ControlButton(); pRet->initWithTitleAndFontNameAndFontSize(title, fontName, fontSize); pRet->autorelease(); return pRet; }
ControlButton* ControlButton::create() { ControlButton *pControlButton = new ControlButton(); if (pControlButton && pControlButton->init()) { pControlButton->autorelease(); return pControlButton; } CC_SAFE_DELETE(pControlButton); return nullptr; }