cocos-lua输入框

前端之家收集整理的这篇文章主要介绍了cocos-lua输入框前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

{"btnSendInput","btnSendInput",function(...) self:onBtnSendField(...) end},

{"btnSyncInput","btnSyncInput",function(...) self:onBtnSyncField(...) end},69); min-height:14px">

function SetLayer:initTextField()

self.m_sendField = ccui.TextField:create("点击输入信息","Helvetica",22)

self.m_sendField:setTouchEnabled(true)

local size = self.m_send:getContentSize()

self.m_sendField:setTouchSize(size)

self.m_sendField:setPosition(cc.p(size.width*0.5,size.height*0.5))

self.m_send:addChild( self.m_sendField)

self.m_syncField = ccui.TextField:create("点击输入信息",69)"> self.m_syncField:setTouchEnabled(true)

local size = self.m_sync:getContentSize()

self.m_syncField:setTouchSize(size)

self.m_syncField:setPosition(cc.p(size.width*0.5,69)"> self.m_sync:addChild( self.m_syncField)

end

function SetLayer:onBtnSendField()

self.m_sendField:attachWithIME()

function SetLayer:onBtnSyncField()

self.m_syncField:attachWithIME()

end

猜你在找的Cocos2d-x相关文章