MenuItem* MenuItem::create( const ccMenuCallback& callback) { MenuItem *ret = new (std::nothrow) MenuItem(); ret->initWithCallback(callback); ret->autorelease(); return ret; }
// XXX deprecated MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector) { MenuItem *ret = new (std::nothrow) MenuItem(); ret->initWithTarget(target, selector); ret->autorelease(); return ret; }
MenuItem* MenuItem::create( const ccMenuCallback& callback) { MenuItem *pRet = new MenuItem(); pRet->initWithCallback(callback); pRet->autorelease(); return pRet; }
// 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; }
// XXX deprecated MenuItem* MenuItem::create(Object *target, SEL_MenuHandler selector) { MenuItem *pRet = new MenuItem(); pRet->initWithTarget(target, selector); pRet->autorelease(); return pRet; }