diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-29 16:37:31 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-29 16:37:31 -0700 |
commit | a603847d18ac5279e5d190ac2eebdf87297590d4 (patch) | |
tree | c96aeb5817c2f009c79a061a1e475b9bda033f8a /drawing.lua | |
parent | 5b95e51c36417adff04de5a62d6ae6d067c0db04 (diff) | |
download | text.love-a603847d18ac5279e5d190ac2eebdf87297590d4.tar.gz |
go through App in a couple more places
Diffstat (limited to 'drawing.lua')
-rw-r--r-- | drawing.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drawing.lua b/drawing.lua index 5575904..677cab3 100644 --- a/drawing.lua +++ b/drawing.lua @@ -56,11 +56,11 @@ function Drawing.draw(line) 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 + name_text = App.newText(love.graphics.getFont(), 'm') -- 1em else - name_text = love.graphics.newText(love.graphics.getFont(), p.name) + name_text = App.newText(love.graphics.getFont(), p.name) end - love.graphics.rectangle('fill', x,y, math.floor(name_text:getWidth()*Zoom), math.floor(15*Zoom)) + love.graphics.rectangle('fill', x,y, math.floor(App.width(name_text)*Zoom), math.floor(15*Zoom)) end end end |