diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-01-15 01:38:38 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-01-15 01:38:38 -0800 |
commit | 348852ee2bdeffee303ec4f8ce796e7605caa62d (patch) | |
tree | 3b5b8e1ec219fa369811520fcf62fca304e5a713 /log_browser.lua | |
parent | 6bd2086b51251ee469b4c9d937624e3be4d97410 (diff) | |
parent | 95d88a8298142a996bf828734f7e986d2f99f9ab (diff) | |
download | view.love-348852ee2bdeffee303ec4f8ce796e7605caa62d.tar.gz |
Merge lines.love
Diffstat (limited to 'log_browser.lua')
-rw-r--r-- | log_browser.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/log_browser.lua b/log_browser.lua index dabec2b..6e7e6db 100644 --- a/log_browser.lua +++ b/log_browser.lua @@ -94,14 +94,14 @@ function log_browser.draw(State, hide_cursor) love.graphics.line(xright,sectiony, xright,y+State.line_height) love.graphics.line(xleft,sectiony, xleft+50-2,sectiony) love.graphics.print(line.section_name, xleft+50,y) - love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony) + love.graphics.line(xleft+50+State.font:getWidth(line.section_name)+2,sectiony, xright,sectiony) else assert(line.section_end, "log line has a section name, but it's neither the start nor end of a section") local sectiony = y+State.line_height-Section_border_padding_vertical love.graphics.line(xleft,y, xleft,sectiony) love.graphics.line(xright,y, xright,sectiony) love.graphics.line(xleft,sectiony, xleft+50-2,sectiony) love.graphics.print(line.section_name, xleft+50,y) - love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony) + love.graphics.line(xleft+50+State.font:getWidth(line.section_name)+2,sectiony, xright,sectiony) end else if type(line.data) == 'string' then @@ -137,7 +137,7 @@ function render_stack_left_margin(State, line_index, line, y) love.graphics.print(line.section_stack[i].name, x+State.font_height+5, y+5, --[[vertically]] math.pi/2) end if y > App.screen.height-log_browser.height(State, line_index) then - love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) + love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-State.font:getWidth(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) end end return log_browser.left_margin(State, line) @@ -152,7 +152,7 @@ function render_stack_right_margin(State, line_index, line, y) love.graphics.print(line.section_stack[i].name, x, y+5, --[[vertically]] math.pi/2) end if y > App.screen.height-log_browser.height(State, line_index) then - love.graphics.print(line.section_stack[i].name, x, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) + love.graphics.print(line.section_stack[i].name, x, App.screen.height-State.font:getWidth(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) end end return log_browser.right_margin(State, line) |