couple of TODOs
This commit is contained in:
parent
c0df6f86a4
commit
6550a4c6d7
|
@ -54,6 +54,7 @@ function Drawing.draw(line)
|
||||||
-- create a faint red box for the name
|
-- create a faint red box for the name
|
||||||
love.graphics.setColor(1,0,0,0.1)
|
love.graphics.setColor(1,0,0,0.1)
|
||||||
local name_text
|
local name_text
|
||||||
|
-- TODO: avoid computing name width on every repaint
|
||||||
if p.name == '' then
|
if p.name == '' then
|
||||||
name_text = love.graphics.newText(love.graphics.getFont(), 'm') -- 1em
|
name_text = love.graphics.newText(love.graphics.getFont(), 'm') -- 1em
|
||||||
else
|
else
|
||||||
|
|
2
text.lua
2
text.lua
|
@ -14,7 +14,7 @@ function Text.draw(line, line_width, line_index)
|
||||||
if line.fragments == nil then
|
if line.fragments == nil then
|
||||||
Text.compute_fragments(line, line_width)
|
Text.compute_fragments(line, line_width)
|
||||||
end
|
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
|
if Debug_new_render then print('--') end
|
||||||
for _, f in ipairs(line.fragments) do
|
for _, f in ipairs(line.fragments) do
|
||||||
local frag, frag_text = f.data, f.text
|
local frag, frag_text = f.data, f.text
|
||||||
|
|
Loading…
Reference in New Issue