Exemplo n.º 1
0
MenuItem* MenuItem::create( const ccMenuCallback& callback)
{
    MenuItem *ret = new (std::nothrow) MenuItem();
    ret->initWithCallback(callback);
    ret->autorelease();
    return ret;
}
Exemplo 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;
}
Exemplo n.º 3
0
MenuItem* MenuItem::create( const ccMenuCallback& callback)
{
    MenuItem *pRet = new MenuItem();
    pRet->initWithCallback(callback);
    pRet->autorelease();
    return pRet;
}
Exemplo 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;
}
Exemplo 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;
}