8.cocos2dx 开关 CCControlSwitch
2013-12-20 14:51
501 查看
CCLabelTTF *labe1=CCLabelTTF::create("开", "Arial-BoldMT", 16); labe1->setColor(ccc3(255, 0, 0)); CCLabelTTF *labe2=CCLabelTTF::create("关", "Arial-BoldMT", 16); CCSprite *sprite2=CCSprite::create("Icon-72.png"); sprite2->setColor(ccc3(0, 255, 0)); labe2->setColor(ccc3(255, 0, 0)); cocos2d::extension::CCControlSwitch *pSwitch=cocos2d::extension::CCControlSwitch::create( CCSprite::create("Icon-72.png"), CCSprite::create("Icon-72.png"), sprite2, sprite2, labe1, labe2 ); //设置关闭状态 pSwitch->setOn(false); //设置可操作 pSwitch->setEnabled(true); //获取是否为打开 pSwitch->setEnabled(true); pSwitch->setPosition(ccp(200, 200)); this->addChild(pSwitch);
相关文章推荐
- Cocos2d-x学习笔记(12)(CCControlSwitch开关、CCControlSlider滑动条、CCControlButton按钮)
- Cocos2d-x学习笔记(12)(CCControlSwitch开关、CCControlSlider滑动条、CCControlButtonbutton)
- cocos2dx基础篇(10)——开关按钮CCControlSwitch
- Cocos2d—X游戏开发之CCToggle(菜单标签切换)CCControlSwitch(开关切换)(十二)
- Cocos2D-x 用CCControlSwitch设置音乐的开关
- Cocos2d-x_CCControlSwitch(开关类)介绍
- CCControlSwitch 开关
- Cocos2d—X游戏开发之CCToggle(菜单标签切换)CCControlSwitch(开关切换)
- CCControlSwitch 开关
- cocos2dx 开关 CCControlSwitch
- cocos2d-x-2.0新增加了几个UI控件,这里我介绍下常用的这几个UI控件(CCControlSlider、CCControlSwitch、CCControlColourPicker)使用方法
- cocos2d-x-2.0新增加了几个UI控件,这里我介绍下常用的这几个UI控件(CCControlSlider、CCControlSwitch、CCControlColourPicker)使用方法
- CCControlSwitch 的学习
- cocos2dx-CCControlSwitch
- Cocos2d-x控件使用CCControlSwitch<代码演示>
- 1cocos2dx扩展库UI控件,CCControlSlider,CCScale9Sprite(九妹图),CCControlSwitch,CCControlButton
- 7、Cocos2d-X 游戏编程之------CCControlSwitch的实现
- CCControlSwitch 、CCControlSlider、CCControlButton
- cocos2d-x-2.0新增加了几个UI控件,这里我介绍下常用的这几个UI控件(CCControlSlider、CCControlSwitch、CCControlColourPicker)使用方法
- 关于CCControlSwitch设置在弹窗上后的触摸优先级问题