打开CocoStudio UI编辑器新项目,设置画布480*320, 添加一个标签和一个按钮控件
导出项目,生成所需要的资源文件, 复制到cocos2d工程Resources目录下
加入代码:
头文件:
#include "cocos2d.h"
#include "cocos-ext.h"
USING_NS_CC;
USING_NS_CC_EXT;
using namespace ui;
加载cocostudio资源创建控件
_touchgroup = TouchGroup::create();
this->addChild(_touchgroup);
_layout = static_cast<Layout*>(GUIR