cocostudio 中使用csb

#include "cocostudio//CocoStudio.h"
#include "ui/CocosGUI.h"
#include <String>


using namespace cocostudio::timeline;


auto rootNode = CSLoader::createNode("Login.csb");

this->addChild(rootNode);

auto image1 = rootNode->getChildByName("Image_1");
cocos2d::ui::Button *logBtn = dynamic_cast<cocos2d::ui::Button*>(image1->getChildByName("Button_1_2_6_10"));

cocos2d::ui::Button *logBtn1 = dynamic_cast<cocos2d::ui::Button*>(image1->getChildByName("Button_1_0_4_8_12"));


阅读更多

没有更多推荐了,返回首页