[原]cocos2d-lua 常用法汇总

1、CCEditBox

local back = CCScale9Sprite:create("res/ui/images/im_02.png", CCRect(20, 20, 1, 1))
back:setContentSize(CCSize(0,0))
self.EditName = CCEditBox:create(CCSize(350,50), back)
self.EditName:setPosition(ccp(250, 60))
self.EditName:setFontSize(24)
self.EditName:setFontColor(ccc3(255,255,255))
self.EditName:setPlaceHolder("请输入CdKey兑换码")
self.EditName:setPlaceholderFontColor(ccc3(137,138,138))
self.EditName:setMaxLength(20)
self.EditName:setReturnType(1)

self.EditName:setText("ASASASASAS")

posted @ 2015-05-20 15:43  U_探索  阅读(647)  评论(0编辑  收藏  举报