[原]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")

你可能感兴趣的:([原]cocos2d-lua 常用法汇总)