CCControlSwitch 开关
来源:互联网 发布:网络打码赚钱是真的吗 编辑:程序博客网 时间:2024/04/27 19:54
/*** CCControlSwitch 开关创建** 有两种常用创建方式,一种只有前面4个参数,意义一样** 参数1:CCSprite对象,作为掩饰底图** 参数2:CCSprite对象,作为打开状态图** 参数3:CCSprite对象,作为关闭状态图** 参数4:CCSprite对象,作为拨动开关的触发图,拥有改变开关状态** 参数5:CCLabelTTF对象,作为打开状态的文字** 参数6:CCLabelTTF对象,作为关闭状态的文字*/CCControlSwitch* pSwitch = CCControlSwitch::create(CCSprite::create("switch-mask.png"),CCSprite::create("switch-on.png"),CCSprite::create("switch-off.png"),CCSprite::create("switch-thumb.png"),CCLabelTTF::create("开","Arial-BoldMT",16),CCLabelTTF::create("关","Arial-BoldMT",16));pSwitch->setPosition(ccp(size.width*0.5,180));//设置开关状态pSwitch->setOn(false);//设置是否可操作pSwitch->setEnabled(true);//获取是否打开pSwitch->isOn();//获取当前开关状态是否喂手动拖动开关进行的pSwitch->hasMoved();this->addChild(pSwitch);
- CCControlSwitch 开关
- CCControlSwitch 开关
- 8.cocos2dx 开关 CCControlSwitch
- cocos2d-x开关按钮类CCControlSwitch
- Cocos2d-x中开关按钮类CCControlSwitch的使用
- Cocos2d-x中开关按钮类CCControlSwitch的使用
- Cocos2D-x 用CCControlSwitch设置音乐的开关
- Cocos2d-x学习笔记(12)(CCControlSwitch开关、CCControlSlider滑动条、CCControlButton按钮)
- Cocos2d—X游戏开发之CCToggle(菜单标签切换)CCControlSwitch(开关切换)(十二)
- cocos2dx CCControlSwitch
- CCControlExtension/CCControlSwitch
- cocos2dx-CCControlSwitch
- cocos2dx-CCControlSwitch
- CCControlSwitch 的使用
- CCControlSwitch 的学习
- CCControlSwitch学习笔记
- 开关
- 开关
- 说说Qt中中文字符的编解码那些事
- java中的Trasient关键字
- ICallbackEventHandler 前后台无刷新交互
- Spring使用OpenSessionInViewFilter解决Hibernate的lazy延时加载问题
- oracle的数据导入导出
- CCControlSwitch 开关
- mysql之存储过程
- 关于一个非常好的数据恢复软件介绍
- Javascript 中的回调函数
- 用valgrind检测glib的内存错误
- HDU--杭电1598--find the most comfortable road--并查集+暴力--反正是大众化的代码,只是我喜欢多写点东西导致我的注释比较多罢了
- app用户手机验证:短信还是语音?
- UIRefreshControl下拉刷新
- 网狐机器人游戏时间单位是什么