Hi!
I have started to use CocoStudio. My actions were:
create a UI project
put some elements on scene and name them
export project
create a scene project
add a component “UI” on scene, bind it with exported UI output
Export scene project
Now I have a .json project output file and resources. In the code I have in extensions the SceneReader. SceneReader can take json file and make CCNode from it.
But how assign a callback to button on that scene? Should I take it by tag, cast to some button class and set then callback, or there is more convenient path?
But the way I get the effect is awful. I hope that it is much more convenient way to bind CocoStudio project with cocos2d-x and set callback on a button.
Yes, I have seen that. But It needs to be UILayer to use getWidget.
The info that I want to know: should I use UI editor for making my game scenes, or I should use scene editor?
UI editor give me the json file, that I can read with CCSGUIReader and output is UIWidget.
Scene editor give me json file, that I can read with CCSSceneReader, and output is CCNode.
If I want to set callbacks and other functional, should I use UI editor instead of scene editor?