1
0
Fork 0
forked from len0rd/rockbox

lua print_table add ability to draw a line separator

allows you to draw a line between items

Change-Id: I7e6e2f56738e12ff06d06a24f0f9d0769932a7b1
This commit is contained in:
William Wilgus 2021-04-08 00:03:18 -04:00 committed by William Wilgus
parent f8ce18c286
commit c77cd7027f
2 changed files with 16 additions and 4 deletions

View file

@ -141,6 +141,7 @@ local _print = {} do
ovfl = "auto",
justify = "left",
autoupdate = true,
drawsep = false,
}
_p_opts.max_line = max_lines(_p_opts)
@ -292,7 +293,12 @@ local _print = {} do
col_buf_insert(msg, o.line, o)
end
end
if o.drawsep == true then
if s_lines[o.line] == true then
rb.set_viewport(o) --nned to revert drawmode if selected
end
rb.lcd_drawline(0, line * h, o.width, line * h)
end
--only update the line we changed
update_line(o.autoupdate, o, line, h)