summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-07 11:21:01 +0100
committerWuzzy <almikes@aol.com>2016-12-07 11:21:01 +0100
commit1c82f3b9981bc0bb8f42b2e89df6b2ab79e441e1 (patch)
tree7be209e9cef3af9d1a0abe340d9c2676662768c1 /init.lua
parent7d8747ca289bb027e33fab5c1859bd042a75b90e (diff)
Allow gallery to display item images
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 04fda87..8de2874 100644
--- a/init.lua
+++ b/init.lua
@@ -609,7 +609,11 @@ doc.widgets.gallery = function(imagedata, playername, x, y, aspect_ratio, width,
local xoffset = buttonoffset + (x + pos * iw)
local nx = xoffset - 0.2
local ny = y - 0.05
- formstring = formstring .. "image["..xoffset..","..y..";"..iw..","..ih..";"..imagedata[i].image.."]"
+ if imagedata[i].imagetype == "item" then
+ formstring = formstring .. "item_image["..xoffset..","..y..";"..iw..","..ih..";"..imagedata[i].image.."]"
+ else
+ formstring = formstring .. "image["..xoffset..","..y..";"..iw..","..ih..";"..imagedata[i].image.."]"
+ end
formstring = formstring .. "label["..nx..","..ny..";"..i.."]"
pos = pos + 1
end