Esempio n. 1
0
MenuItem* MenuItem::create( const ccMenuCallback& callback)
{
    MenuItem *ret = new (std::nothrow) MenuItem();
    ret->initWithCallback(callback);
    ret->autorelease();
    return ret;
}
Esempio n. 2
0
// XXX deprecated
MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector)
{
    MenuItem *ret = new (std::nothrow) MenuItem();
    ret->initWithTarget(target, selector);
    ret->autorelease();
    return ret;
}
Esempio n. 3
0
MenuItem* MenuItem::create( const ccMenuCallback& callback)
{
    MenuItem *pRet = new MenuItem();
    pRet->initWithCallback(callback);
    pRet->autorelease();
    return pRet;
}
Esempio n. 4
0
// FIXME: deprecated
MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector)
{
    MenuItem *ret = new (std::nothrow) MenuItem();
    ret->initWithCallback(std::bind(selector, target, std::placeholders::_1));
    ret->autorelease();
    return ret;
}
Esempio n. 5
0
// XXX deprecated
MenuItem* MenuItem::create(Object *target, SEL_MenuHandler selector)
{
    MenuItem *pRet = new MenuItem();
    pRet->initWithTarget(target, selector);
    pRet->autorelease();
    return pRet;
}