Пример #1
0
MenuItem* MenuItem::create( const ccMenuCallback& callback)
{
    MenuItem *ret = new (std::nothrow) MenuItem();
    ret->initWithCallback(callback);
    ret->autorelease();
    return ret;
}
Пример #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;
}
Пример #3
0
MenuItem* MenuItem::create( const ccMenuCallback& callback)
{
    MenuItem *pRet = new MenuItem();
    pRet->initWithCallback(callback);
    pRet->autorelease();
    return pRet;
}
Пример #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;
}
Пример #5
0
// XXX deprecated
MenuItem* MenuItem::create(Object *target, SEL_MenuHandler selector)
{
    MenuItem *pRet = new MenuItem();
    pRet->initWithTarget(target, selector);
    pRet->autorelease();
    return pRet;
}