[lua-tests] replace cc.LabelTTF:create with cc.Label:createWithTTF (#19806)

* remove in FileUtilsTest

* fix label
This commit is contained in:
minggo 2019-06-06 02:51:01 -07:00 committed by GitHub
commit a0a4e08674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -302,7 +302,7 @@ function FileUtilsGetDataDemo:dumpHex(str)
end
function FileUtilsGetDataDemo:onEnter()
local label = cc.LabelTTF:create("error happended while reading file data", "Marker Felt", 20)
local label = cc.Label:createWithTTF("error happended while reading file data", "fonts/Marker Felt.ttf", 20)
-- print(self.hexString)
-- print("............")
-- print(self.hexRead)

View File

@ -26,7 +26,7 @@ local function TestNode()
result[#result+1] = 'Loading by path "'..tab[1]..'", filename "'..tab[2]..'": '..(ok and 'success' or 'failure')
package.path = oldPath
end
local label = cc.LabelTTF:create(table.concat(result, '\n'), "Marker Felt", 10)
local label = cc.Label:createWithTTF(table.concat(result, '\n'), "fonts/Marker Felt.ttf", 10)
node:addChild(label, 1)
label:setAnchorPoint(cc.p(0.5, 0.5))
label:setPosition(VisibleRect:center())