.h文件
void menuCallBack(CCObject* pSender);
.cpp
CCMenuItemSprite* item = CCMenuItemSprite::create(
menuCB1,
menuCB2,
this,
menu_selector(helloworld::menuCallBack));
item->setTag(m);
回调方法
void helloworld::menuCallBack(CCObject* pSender)
{
CCNode* node = dynamic_cast<CCNode*>(pSender);
CCLog("【====PopupLayer::buttonCallBack====】touch tag: %d", node->getTag());
}
获取点击的菜单按钮tag