diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-04-02 09:31:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-04-02 09:31:56 -0700 |
commit | 24a48e665ff381b0c134fe7c834b5476686b441e (patch) | |
tree | fd196e4a6bc430a46e67e4c3573842bd2b284834 /log_browser.lua | |
parent | 1330e4b9168e07b629a47dec436dec2484686db7 (diff) | |
parent | 3547c18db6b9d508fb5c2399c124e33f4cc8c488 (diff) | |
download | view.love-24a48e665ff381b0c134fe7c834b5476686b441e.tar.gz |
Merge text.love
Diffstat (limited to 'log_browser.lua')
-rw-r--r-- | log_browser.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/log_browser.lua b/log_browser.lua index 46d84c0..b128ab7 100644 --- a/log_browser.lua +++ b/log_browser.lua @@ -98,21 +98,20 @@ function log_browser.draw(State) local xright = render_stack_right_margin(State, line_index, line, y) if line.section_name then App.color(Section_border_color) - local section_text = to_text(line.section_name) if line.section_begin then local sectiony = y+Section_border_padding_vertical love.graphics.line(xleft,sectiony, xleft,y+State.line_height) love.graphics.line(xright,sectiony, xright,y+State.line_height) love.graphics.line(xleft,sectiony, xleft+50-2,sectiony) - love.graphics.draw(section_text, xleft+50,y) - love.graphics.line(xleft+50+App.width(section_text)+2,sectiony, xright,sectiony) + love.graphics.print(line.section_name, xleft+50,y) + love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony) else assert(line.section_end) 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.draw(section_text, xleft+50,y) - love.graphics.line(xleft+50+App.width(section_text)+2,sectiony, xright,sectiony) + love.graphics.print(line.section_name, xleft+50,y) + love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony) end else if type(line.data) == 'string' then @@ -148,7 +147,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(to_text(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-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) end end return log_browser.left_margin(State, line) @@ -163,7 +162,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(to_text(line.section_stack[i].name))-5, --[[vertically]] math.pi/2) + love.graphics.print(line.section_stack[i].name, x, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2) end end return log_browser.right_margin(State, line) |