mirror of https://github.com/axmolengine/axmol.git
[lua-tests] replace cc.LabelTTF:create with cc.Label:createWithTTF (#19806)
* remove in FileUtilsTest * fix label
This commit is contained in:
commit
a0a4e08674
|
@ -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)
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue