diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lua/include_lua/draw_poly.lua | 2 | ||||
-rw-r--r-- | apps/plugins/lua/include_lua/print.lua | 8 | ||||
-rw-r--r-- | apps/plugins/lua_scripts/print_lua_func.lua | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/apps/plugins/lua/include_lua/draw_poly.lua b/apps/plugins/lua/include_lua/draw_poly.lua index fd76a582b1..0354a5fdfd 100644 --- a/apps/plugins/lua/include_lua/draw_poly.lua +++ b/apps/plugins/lua/include_lua/draw_poly.lua | |||
@@ -29,6 +29,8 @@ | |||
29 | if not rb.lcd_framebuffer then rb.splash(rb.HZ, "No Support!") return nil end | 29 | if not rb.lcd_framebuffer then rb.splash(rb.HZ, "No Support!") return nil end |
30 | 30 | ||
31 | local _poly = {} do | 31 | local _poly = {} do |
32 | -- Internal Constants | ||
33 | local rocklib_image = getmetatable(rb.lcd_framebuffer()) | ||
32 | local BSAND = 8 -- blits color to dst if src <> 0 | 34 | local BSAND = 8 -- blits color to dst if src <> 0 |
33 | local _NIL = nil -- nil placeholder | 35 | local _NIL = nil -- nil placeholder |
34 | 36 | ||
diff --git a/apps/plugins/lua/include_lua/print.lua b/apps/plugins/lua/include_lua/print.lua index 87fd11d4b6..5ea0423f01 100644 --- a/apps/plugins/lua/include_lua/print.lua +++ b/apps/plugins/lua/include_lua/print.lua | |||
@@ -299,23 +299,23 @@ local _print = {} do | |||
299 | end | 299 | end |
300 | 300 | ||
301 | -- Helper function that acts mostly like a normal printf() would | 301 | -- Helper function that acts mostly like a normal printf() would |
302 | local function printf(...) | 302 | local function printf(fmt, v1, ...) |
303 | local o = get_settings(true) | 303 | local o = get_settings(true) |
304 | local w, h, msg | 304 | local w, h, msg |
305 | local line = o.line - 1 -- rb is 0-based lua is 1-based | 305 | local line = o.line - 1 -- rb is 0-based lua is 1-based |
306 | 306 | ||
307 | if not (...) or (...) == "\n" then -- handles blank line / single '\n' | 307 | if not (fmt) or (fmt) == "\n" then -- handles blank line / single '\n' |
308 | local res, w, h = text_extent(" ", o.font) | 308 | local res, w, h = text_extent(" ", o.font) |
309 | 309 | ||
310 | clear_line(o, line, h) | 310 | clear_line(o, line, h) |
311 | update_line(o.autoupdate, o, line, h) | 311 | update_line(o.autoupdate, o, line, h) |
312 | 312 | ||
313 | if (...) then set_line(_NIL) end | 313 | if (fmt) then set_line(_NIL) end |
314 | 314 | ||
315 | return o.line, o.max_line, o.width, h | 315 | return o.line, o.max_line, o.width, h |
316 | end | 316 | end |
317 | 317 | ||
318 | msg = string.format(...) | 318 | msg = string.format(fmt, v1, ...) |
319 | 319 | ||
320 | show_selected(o.line, msg) | 320 | show_selected(o.line, msg) |
321 | 321 | ||
diff --git a/apps/plugins/lua_scripts/print_lua_func.lua b/apps/plugins/lua_scripts/print_lua_func.lua index f2642a187b..ef0290bbd8 100644 --- a/apps/plugins/lua_scripts/print_lua_func.lua +++ b/apps/plugins/lua_scripts/print_lua_func.lua | |||
@@ -4,7 +4,13 @@ require "audio" | |||
4 | require "buttons" | 4 | require "buttons" |
5 | require "color" | 5 | require "color" |
6 | require "draw" | 6 | require "draw" |
7 | require "draw_floodfill" | ||
8 | require "draw_poly" | ||
9 | require "draw_text" | ||
10 | |||
7 | require "image" | 11 | require "image" |
12 | require "image_save" | ||
13 | |||
8 | require "lcd" | 14 | require "lcd" |
9 | require "math_ex" | 15 | require "math_ex" |
10 | require "pcm" | 16 | require "pcm" |