summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua/include_lua/print.lua
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-04-08 00:03:18 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2021-04-08 04:15:40 +0000
commitc77cd7027f3597384f4474c049b28014027845b6 (patch)
tree8bf1b92dc7b5e69f76b66e2b1c147f5176e95aaa /apps/plugins/lua/include_lua/print.lua
parentf8ce18c286b644f30839ac8db8cb04e9f10606a1 (diff)
downloadrockbox-c77cd7027f3597384f4474c049b28014027845b6.tar.gz
rockbox-c77cd7027f3597384f4474c049b28014027845b6.tar.bz2
rockbox-c77cd7027f3597384f4474c049b28014027845b6.zip
lua print_table add ability to draw a line separator
allows you to draw a line between items Change-Id: I7e6e2f56738e12ff06d06a24f0f9d0769932a7b1
Diffstat (limited to 'apps/plugins/lua/include_lua/print.lua')
-rw-r--r--apps/plugins/lua/include_lua/print.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/plugins/lua/include_lua/print.lua b/apps/plugins/lua/include_lua/print.lua
index 3e92a155ba..3fb19bef1f 100644
--- a/apps/plugins/lua/include_lua/print.lua
+++ b/apps/plugins/lua/include_lua/print.lua
@@ -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)