コード例 #1
0
ControlButton* ControlButton::create(Scale9Sprite* sprite)
{
    ControlButton *pRet = new ControlButton();
    pRet->initWithBackgroundSprite(sprite);
    pRet->autorelease();
    return pRet;
}
コード例 #2
0
ControlButton* ControlButton::create(Node* label, Scale9Sprite* backgroundSprite)
{
    ControlButton *pRet = new ControlButton();
    pRet->initWithLabelAndBackgroundSprite(label, backgroundSprite);
    pRet->autorelease();
    return pRet;
}
コード例 #3
0
ControlButton* ControlButton::create(string title, const char * fontName, float fontSize)
{
    ControlButton *pRet = new ControlButton();
    pRet->initWithTitleAndFontNameAndFontSize(title, fontName, fontSize);
    pRet->autorelease();
    return pRet;
}
コード例 #4
0
ControlButton* ControlButton::create()
{
    ControlButton *pControlButton = new ControlButton();
    if (pControlButton && pControlButton->init())
    {
        pControlButton->autorelease();
        return pControlButton;
    }
    CC_SAFE_DELETE(pControlButton);
    return nullptr;
}