Updated advernturer blessing inventory style to be more robust

This commit is contained in:
TheSumm
2015-01-19 01:52:49 +01:00
parent 63f95317a2
commit fc76ca4523
14 changed files with 25 additions and 8 deletions

View File

@@ -62,13 +62,7 @@ function toggleAdventurerStyle(hasBlessing)
for slot = InventorySlotFirst, InventorySlotLast do
local itemWidget = inventoryPanel:getChildById('slot' .. slot)
if itemWidget then
if hasBlessing then
itemWidget:setBorderWidth(1)
itemWidget:setBorderColor('#F7C80C')
else
itemWidget:setBorderWidth(0)
itemWidget:setBorderColor('white')
end
itemWidget:setOn(hasBlessing)
end
end
end
@@ -114,7 +108,7 @@ function onInventoryChange(player, slot, item, oldItem)
local itemWidget = inventoryPanel:getChildById('slot' .. slot)
if item then
itemWidget:setStyle('Item')
itemWidget:setStyle('InventoryItem')
itemWidget:setItem(item)
else
itemWidget:setStyle(InventorySlotStyles[slot])