diff --git a/frontend/ui/widget/imagewidget.lua b/frontend/ui/widget/imagewidget.lua index 5e5d3ce0a..ae6bd890e 100644 --- a/frontend/ui/widget/imagewidget.lua +++ b/frontend/ui/widget/imagewidget.lua @@ -1,7 +1,7 @@ --[[-- -ImageWidget shows an image from a file +ImageWidget shows an image from a file or memory -Example: +Show image from file example: UIManager:show(ImageWidget:new{ file = "resources/info-i.png", @@ -9,6 +9,15 @@ Example: -- alpha = true, }) + +Show image from memory example: + + UIManager:show(ImageWidget:new{ + -- bitmap_buffer should be a block of memory that holds the raw + -- uncompressed bitmap. + image = bitmap_buffer, + }) + ]] local Widget = require("ui/widget/widget")