因为我们写了个创建MenuItemSprite的方法。 如下
声明:
static MenuItemSprite *getScaleMenuItemSprite(const char *normalImage, const char *selectedImage, const char disabledImage,
Object target, SEL_MenuHandler selector, bool bDisableSaturation, Point cpMenuTouchScale);
实现:
CCMenuItemSprite* HCommonFun::getScaleMenuItemSprite(const char *normalImage, const char *selectedImage, const char disabledImage,
Ref target, SEL_MenuHandler selector, bool bDisableSaturation, CCPoint cpMenuTouchScale)
{
…略
MenuItemSprite *pMenuItem =MenuItemSprite::create(pNormalSp, pSelectedSp, pDisabledSp, selector);
}
调用:
this->createButton(this,cancelButtonPic->getCString(),
(NULL != cancelButtonTitle?cancelButtonTitle->getCString():NULL),
this,
menu_selector(HAlertView::onSure),
Point(_contentSize.width *0.75,10),
cancelButtonIndex,
BUTTON_OFFSET_Y_ADD);
而3.0以后。现在改成了这样的方式
auto sprite2 = MenuItemSprite::create(pNormalSp, pSelectedSp,pDisabledSp, CC_CALLBACK_1(HAlertView::onSure, this) );
请问高手 我如何把CC_CALLBACK_1(HAlertView::onSure, this) 以参数形式写到上面的自定义的静态方法里面去呢?