Different resoultions strategy and listening to Click

Hello

I can’t get it in full:

Cocos2d-x v3
Cocostudio 1.2.0.1

I want to get button from loaded UI.
Is it correct approach?

     auto m = cocostudio::GUIReader::getInstance()->widgetFromJsonFile("DemoHead_UI.json");
     auto view = m->getChildByName("ImageView");
     auto button = view->getComponent("mainButton");

I want to get CLICK event from the button founded. Should I use usual TouchEnded handling or there are more simple approach? Should I wait for some special event bubblingup?


V3.0 offered special solution for multiresolution (folders etc), but Cocostudio exports cavases in different JSONs. So if I make window for different resolutions in different canvases, the will be exported in different jsons. And I have to rename these files to have same name and copy them to proper folders. Am I right? Or I use incorrect approach?
But I found not any link with canvases in “canvas list” and canvases (mean screen resolution).

Please point me to a correct direction.

  • one more.

May I some how add special event dispatched in the middle of the animation? Like adding avent in the middle of the attack animation to do something like “create fireball”.