couple of TODOs

This commit is contained in:
Kartik K. Agaram 2022-05-21 16:41:34 -07:00
parent c0df6f86a4
commit 6550a4c6d7
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ function Drawing.draw(line)
-- create a faint red box for the name
love.graphics.setColor(1,0,0,0.1)
local name_text
-- TODO: avoid computing name width on every repaint
if p.name == '' then
name_text = love.graphics.newText(love.graphics.getFont(), 'm') -- 1em
else

View File

@ -14,7 +14,7 @@ function Text.draw(line, line_width, line_index)
if line.fragments == nil then
Text.compute_fragments(line, line_width)
end
line.screen_line_starting_pos = nil
line.screen_line_starting_pos = nil -- TODO: avoid recomputing on every repaint
if Debug_new_render then print('--') end
for _, f in ipairs(line.fragments) do
local frag, frag_text = f.data, f.text