local btn = ccui.Button:create()
btn:setTitleText("文本按钮")
btn:setTitleColor(cc.c3b(0, 128, 0))
btn:setTitleFontSize(24)
btn:addTo(self)
btn:pos(display.cx, display.cy + 400)
btn:addTouchEventListener(function(ref, eventType)
if cc.EventCode.BEGAN == eventType then
print("BEGAN")
elseif cc.EventCode.MOVED == eventType then
print("MOVED")
elseif cc.EventCode.ENDED == eventType then
print("ENDED")
elseif cc.EventCode.CANCELLED == eventType then
print("CANCEL")
end
end)