【文件属性】:
文件名称:Cocos2d-x UI开发之CCControlSwitch控件类使用实例
文件大小:42KB
文件格式:PDF
更新时间:2021-01-01 14:28:25
c cocos2d-x cos
CCControlSwitch是开关按钮,关于控件使用时的一些配置,请参见文章:UI开发之控件类-CCControlButton。以下的演示中出现的key和value代表什么意思,知道的人说一声。
bool HelloWorld::init()
{
bool bRet = false;
do
{
CC_BREAK_IF(! CCLayer::init());
//参数就不说了,看一下你的资源文件就明白了
CCControlSwitch * controlSwitch = CCControlSwitch::create(
CCSprite::create(