diff --git a/0019-B b/0019-B index 2bf7d7c..00ec547 100644 --- a/0019-B +++ b/0019-B @@ -1,6 +1,5 @@ -B = function() +B = function(font) -- 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 if obj.type == 'line' then obj.zdata = {} @@ -17,8 +16,8 @@ B = function() obj.zdata = love.math.newBezierCurve(zdata):render() elseif obj.type == 'text' then if obj.w then - update_editor_box(obj, font or obj.editor.font) - if obj.editor and obj.editor.font then font = obj.editor.font end + update_editor_box(obj, font) + if font == nil and obj.editor then font = obj.editor.font end else obj.text = love.graphics.newText(love.graphics.getFont(), obj.data) end diff --git a/0021-compute_layout b/0021-compute_layout index 23a3a99..b77e4c5 100644 --- a/0021-compute_layout +++ b/0021-compute_layout @@ -97,4 +97,4 @@ compute_layout = function(node, x,y, nodes_to_render, font) end end return x+node.w,y+node.h -end +end \ No newline at end of file diff --git a/0028-A b/0028-A index 15a64d2..e118f2c 100644 --- a/0028-A +++ b/0028-A @@ -14,6 +14,6 @@ A = function() end end -- continue the pipeline - B() + B(font) -- TODO: ugly that we're manipulating editor objects twice -end \ No newline at end of file +end