Merge luaML.love
This commit is contained in:
commit
d40ac001fb
7
0019-B
7
0019-B
|
@ -1,6 +1,5 @@
|
||||||
B = function()
|
B = function(font)
|
||||||
-- recompute various aspects based on the current viewport settings
|
-- recompute various aspects based on the current viewport settings
|
||||||
local font = nil -- ensure a single font object over the whole surface
|
|
||||||
for _,obj in ipairs(Surface) do
|
for _,obj in ipairs(Surface) do
|
||||||
if obj.type == 'line' then
|
if obj.type == 'line' then
|
||||||
obj.zdata = {}
|
obj.zdata = {}
|
||||||
|
@ -17,8 +16,8 @@ B = function()
|
||||||
obj.zdata = love.math.newBezierCurve(zdata):render()
|
obj.zdata = love.math.newBezierCurve(zdata):render()
|
||||||
elseif obj.type == 'text' then
|
elseif obj.type == 'text' then
|
||||||
if obj.w then
|
if obj.w then
|
||||||
update_editor_box(obj, font or obj.editor.font)
|
update_editor_box(obj, font)
|
||||||
if obj.editor and obj.editor.font then font = obj.editor.font end
|
if font == nil and obj.editor then font = obj.editor.font end
|
||||||
else
|
else
|
||||||
obj.text = love.graphics.newText(love.graphics.getFont(), obj.data)
|
obj.text = love.graphics.newText(love.graphics.getFont(), obj.data)
|
||||||
end
|
end
|
||||||
|
|
|
@ -97,4 +97,4 @@ compute_layout = function(node, x,y, nodes_to_render, font)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return x+node.w,y+node.h
|
return x+node.w,y+node.h
|
||||||
end
|
end
|
Loading…
Reference in New Issue