cc.ui为nil了?无法创建按钮
api变动,创建按钮
local function createButton(node,imgname,x,y,callback)
ccui.Button:create(imgname,imgname)
:setAnchorPoint(cc.p(0.5,0.5))
:setPosition(cc.p(x,y))
:addTo(node)
:addClickEventListener(callback)
end
local function createButton(node,imgname,x,y,callback)
ccui.Button:create(imgname,imgname)
:setAnchorPoint(cc.p(0.5,0.5))
:setPosition(cc.p(x,y))
:addTo(node)
:addClickEventListener(callback)
end
估计api改了,建议你看看引擎原代码。搜索引擎的ui文件夹