Lua封装增加CCEditBox编辑框接口
来源:互联网 发布:淘宝团扇 编辑:程序博客网 时间:2024/05/17 21:39
增加编辑框,支持Tag替换
function AddEditBox( size, pos, target, tag, zorder )if( tag == nil ) then tag = 0; endif( zorder == nil ) then zorder = 0; endif( tag ~= 0 and target:getChildByTag(tag) ) thentarget:removeChildByTag( tag, true );endlocal sprite = CCEditBox:create(size, CCScale9Sprite:create("editbg.png", CCRectMake(0, 0, 24, 28), CCRectMake(10, 10, 4, 8)))if( sprite == nil ) then return nil; endsprite:setReturnType( kKeyboardReturnTypeGo )sprite:setPosition( pos )target:addChild( sprite, zorder, tag )return sprite;end
EX:
同之前的文章用法
0 0
- Lua封装增加CCEditBox编辑框接口
- Lua封装增加Sprite接口
- Lua封装增加ImageButton接口
- Lua封装增加CCLabel接口
- CCEditBox 编辑框
- CCEditBox 编辑框
- CCEditBox lua 输入框
- Lua封装增加九宫Sprite接口
- Cocos2d-x CCEditBox 编辑框
- 7 cocos2d-x CCEditBox 编辑框
- cocos2dx一编辑框的使用CCEditBox
- 编辑框CCEditBox 设置字体不起作用
- Cocos2d-x中编辑框CCEditBox的使用
- Cocos2d-x学习笔记(11)(CCEditBox编辑框)
- Cocos2d-x中编辑框CCEditBox的使用
- CCEditBox之接口篇
- 22、C#:利用接口增加封装安全性
- 编辑框之用CCEditBox来代替废弃的UITextField控件
- Ubuntu14.04 vsftpd安装与配置
- 选择器的使用——郭挺
- HDU ACM组队安排 [基础DP+打表]
- Multi-task
- 【Swing】 事件处理+actionlistener
- Lua封装增加CCEditBox编辑框接口
- 私有化构造函数的作用
- tomcat CATALINA_BASE环境变量配置
- 从零开始写javaweb框架笔记6-需求分析与系统设计
- 【2015HDU11月校赛(新生赛)ABCDEFGH题解】
- appcompat problem
- 二叉树删除
- Hdu 5586 Sum
- shell 11-29