新人看了很多帖子都是五花八门,不知道怎么写按钮监听函数,
获取编辑器按钮需要用button还是UIbutton,像UIButton,ComAudio之类的需要包含哪些头文件?回调函数参数里Widget也用不了·····
找到两种写法,都不知道怎么用啊/(ㄒoㄒ)/~~
button->addTouchEventListener(this, toucheventselector(MenuScene::touchEvent));
void MenuScene::touchEvent(CCObject *pSender, TouchEventType type)
button->addTouchEventListener(CC_CALLBACK_2(MenuScene::touchEvent), this));
void MenuScene::onTouchEvent(cocos2d::Ref *ref, Widget::TouchEventType touchType)