使用cocostudio编辑好的界面,如何添加响应触摸事件

listener事件不响应啊 ,求解。。。。

m_root=GUIReader::getInstance()->widgetFromJsonFile(“BagCell/BagCell_1.json”);
m_root->setTouchEnabled(true);
this->addChild(m_root);

auto listener=EventListenerTouchOneByOne::create();
listener->onTouchBegan=CC_CALLBACK_2(HelloWorld::touchBegan, this);
listener->onTouchMoved=CC_CALLBACK_2(HelloWorld::touchMove, this);
listener->onTouchEnded=CC_CALLBACK_2(HelloWorld::touchEnd, this);
this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);

好吧 需要把UI最上层交互 选项去掉

我也遇到一样的问题,使用addEventListenerWithFixedPriority好像可以

我试了一下,是这样的