• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
linux_ios
博客园    首页    新随笔    联系   管理    订阅  订阅
2013年3月31日
cocos2dx 开关 CCControlSwitch
摘要: //CCLabelTTF * label1 = CCLabelTTF::create("开", "Arial-BodMT", 16);CCLabelTTF * label2 = CCLabelTTF ::create("关", "Arial-BodMT", 16);// 创建CCControlSwitch 开关// 参数1: 掩饰底图// 参数2 作为打开状态// 参数3 作为关闭状态// 参数4 作为开关触发图// 参数5 作为打开的文字// 参数6 作为关闭的文字CCControlSwitch * pSwitc 阅读全文
posted @ 2013-03-31 20:06 linux_ios 阅读(669) 评论(0) 推荐(0)
cocos2dx 编辑框 CCEditBox
摘要: .cpp文件bool HelloWorld::init(){ ////////////////////////////// // 1. super init first if ( !CCLayer::init() ) { return false; } CCSize size = CCDirector::sharedDirector()->getWinSize(); CCScale9Sprite * sacel9SprY=CCScale9Sprite::create("green_edit.png"); CCEditBox * bo... 阅读全文
posted @ 2013-03-31 17:40 linux_ios 阅读(5253) 评论(0) 推荐(0)
CCMenuItem 的作用 和方法
摘要: // 菜单是游戏中必不可少的一部分的界面元素 在cocos2dx中封装了 ccmenu类// CCMenu * menu = CCMenu ::create();创建方式// 5中创建CCMenuItem // CCMenuItemFont// 参数1 显示的文字 参数2 触发的目标对象 参数3 触发的目标函数 CCMenuItemFont * itemfont = CCMenuItemFont::create("开始游戏", this,menu_selector(HelloWorld::menuFun)); itemfont->se... 阅读全文
posted @ 2013-03-31 13:36 linux_ios 阅读(617) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3