Use bag icons directly from UI

This commit is contained in:
Wuzzy 2016-09-01 20:05:40 +02:00
parent 4a8da309e5
commit 1750111664
4 changed files with 3 additions and 3 deletions

@ -16,7 +16,7 @@ function inventory_icon.get_inventory_state(inv, listname)
end
function inventory_icon.replace_icon(name)
return "inventory_icon_"..name
return name.."^[resize:32x32"
end
minetest.register_on_joinplayer(function(player)
@ -55,7 +55,7 @@ minetest.register_on_joinplayer(function(player)
if bag:is_empty() then
scale = { x = 0, y = 0 }
text = ""
icon = "inventory_icon_bags_small.png"
icon = "bags_small.png^[resize:32x32"
else
scale = { x = 1, y = 1 }
local occupied, size = inventory_icon.get_inventory_state(player:get_inventory(), "bag"..i.."contents")
@ -115,7 +115,7 @@ minetest.register_globalstep(function(dtime)
if bag:is_empty() then
scale = { x = 0, y = 0 }
text = ""
icon = "inventory_icon_bags_small.png"
icon = "bags_small.png^[resize:32x32"
else
scale = { x = 1, y = 1 }
local occupied, size = inventory_icon.get_inventory_state(player:get_inventory(), "bag"..i.."contents")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 B