diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-21 16:41:34 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-21 16:42:22 -0700 |
commit | 6550a4c6d7d23d7769142b3d86eaa8f70f216970 (patch) | |
tree | 0ff9eb8cc603eddcf29f0e56e2e3ec7fc8046a73 | |
parent | c0df6f86a4c2cfd07b2dcd38315a22b69a68938e (diff) | |
download | text.love-6550a4c6d7d23d7769142b3d86eaa8f70f216970.tar.gz |
couple of TODOs
-rw-r--r-- | drawing.lua | 1 | ||||
-rw-r--r-- | text.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drawing.lua b/drawing.lua index 3bc879e..cab5dea 100644 --- a/drawing.lua +++ b/drawing.lua @@ -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 diff --git a/text.lua b/text.lua index 20cc782..83e185b 100644 --- a/text.lua +++ b/text.lua @@ -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 |