Exemple #1
0
MenuItemLabel* MenuItemLabel::create(Node *label)
{
    MenuItemLabel *ret = new (std::nothrow) MenuItemLabel();
    ret->initWithLabel(label, (const ccMenuCallback&) nullptr);
    ret->autorelease();
    return ret;
}
Exemple #2
0
// XXX: deprecated
MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler selector)
{
    MenuItemLabel *ret = new (std::nothrow) MenuItemLabel();
    ret->initWithLabel(label, target, selector);
    ret->autorelease();
    return ret;
}
MenuItemLabel* MenuItemLabel::create(Node *label)
{
    MenuItemLabel *pRet = new MenuItemLabel();
    pRet->initWithLabel(label, (const ccMenuCallback&) nullptr);
    pRet->autorelease();
    return pRet;
}
Exemple #4
0
MenuItemLabel * MenuItemLabel::create(Node*label, const ccMenuCallback& callback)
{
    MenuItemLabel *ret = new MenuItemLabel();
    ret->initWithLabel(label, callback);
    ret->autorelease();
    return ret;
}
// XXX: deprecated
MenuItemLabel * MenuItemLabel::create(Node*label, Object* target, SEL_MenuHandler selector)
{
    MenuItemLabel *pRet = new MenuItemLabel();
    pRet->initWithLabel(label, target, selector);
    pRet->autorelease();
    return pRet;
}