Hello, I started implementing a basic scene from Cocos Studio with buttons etc. I’ve got the scene working fine in code using Cocos2D-x it is loaded in to my project via the CSLoader. I’m having trouble getting the callbacks system to work for the widgets.
The code I have implemented for the widget reader and widget node is based pretty much entirely on this code https://gist.github.com/darkdukey/4df4b26627b210f28277.
The main problem I can see in my project is that this function createNodeWithFlatBuffers() in the WidgetReader class is never called, that function also creates an instance of the root node widget MyWidget class that has all the code for the touch callbacks.
I don’t know if I should be calling createNodeWithFlatBuffers() or it should be getting called internally by cocos and I am missing some other setup functions besides these ones.
CSLoader* instance = CSLoader::getInstance();
instance->registReaderObject("MyWidgetReader ",(ObjectFactory::Instance)MyWidgetReader::getInstance);
Apart from creating an instance of widgetreader and registering it with the loader I’m not sure what else to do to get this working.