Cocostudio v3.2 + Mac cocostudio 1.0.0.0
void TollgateScene::createUI()
{
//auto UI = cocostudio::GUIReader::getInstance()->widgetFromJsonFile(“OprUI_1.ExportJson”);
//auto UI = cocostudio::NodeReader:getInstance():createNode(“OprUI_1.ExportJson”);
auto UI = cocostudio::timeline::NodeReader::getInstance()->createNode(“OprUI_1.ExportJson”);
this->addChild(UI);
//Create button
auto leftBtn = (Button*)UI->getChildByName("leftBtn");
auto rightBtn = (Button*)UI->getChildByName("rightBtn");
auto quickMoveBtn = (Button*)UI->getChildByName("quickMoveBtn");
//childeBtn->addTouchEventListener(CC_CALLBACK_2(HelloWorld::touchEvent,this));
leftBtn->addTouchEventListener(this, toucheventselector(TollgateScene::moveToLeft));
rightBtn->addTouchEventListener(this, toucheventselector(TollgateScene::moveToRight));
quickMoveBtn->addTouchEventListener(this, toucheventselector(TollgateScene::quickMove));
}