remove a stray use of LÖVE Text objects
This commit is contained in:
parent
c3de51769c
commit
a88d9c1907
|
@ -17,8 +17,7 @@ compute_layout = function(node, x,y, nodes_to_render, preserve_screen_top_of_cur
|
|||
else
|
||||
node.w = 0
|
||||
for i,s in ipairs(node.data) do
|
||||
local text = love.graphics.newText(font(20), node.data)
|
||||
local width = text:getWidth()
|
||||
local width = love.graphics.getFont():getWidth(s)
|
||||
if node.w < width then node.w = width end
|
||||
end
|
||||
end
|
||||
|
@ -95,4 +94,4 @@ compute_layout = function(node, x,y, nodes_to_render, preserve_screen_top_of_cur
|
|||
end
|
||||
end
|
||||
return x+node.w,y+node.h
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue