3.0rc版
今天用了3.0rc版本发现和之前的2.2.2版本在cocostudio方面有有些不同了
_uiLayer = Layer::create();
addChild(_uiLayer);
_widget = dynamic_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("NewUI/Export/NewUI_1/NewUI_1.json"));
_uiLayer->addChild(_widget);
Layout* root = static_cast<Layout*>(_uiLayer->getChildByTag(5)); 问下该处的tag指的是层容器的Tag吗
Button* left_button = dynamic_cast<Button*>(root->getChildByName("jump"));
left_button->addTouchEventListener(this, toucheventselector(StartGameScene::jump));