1、UILabel
local lab=cc.ui.UILabel.new({
UILabelType=1
,color=cc.Color3BMake(0,0,0)
,text=string.format(
"Level:%s"
,tostring(3))
,font=
"UIFont.fnt"
,x=600
,y=300
,align=cc.ui.TEXT_ALIGN_LEFT
})
lab:setString(
"ddddd"
)
self:addChild(lab)
2、UIPushButton
|
local btnTest=cc.ui.UIPushButton;
btnTest.new(
"#button_down.png"
)
:onButtonClicked(function() print(
"ss"
) end)
:align(display.CENTER,300,300)
:addTo(self)
与ccscrollow用时 ccscorowllow不能被点击
|