I created ui with cocostudio. Here is the structure:
mainscroll is ScrollView
tmpPanel is Layout
I want to get some of the buttons by:
auto mainWidget = (Layout*)cocostudio::GUIReader::getInstance()->widgetFromJsonFile(fileName);
mainWidget->enumerateChildren("//Level1Btn", [](Node *node)
{
CCLOG("%s", "found");
});
But it simply does not work. I used this method for other UI’s and it worked.