fix party shield, inventory mouse release

This commit is contained in:
Henrique Santiago 2012-01-11 02:43:10 -02:00
parent e714f9e149
commit 71ed758a3f
3 changed files with 9 additions and 9 deletions

View File

@ -51,15 +51,15 @@ function Creature:onShieldChange(shieldId)
elseif shieldId == ShieldBlueSharedExp then elseif shieldId == ShieldBlueSharedExp then
self:setShieldTexture(resolvepath('images/shield_blue_shared.png')) self:setShieldTexture(resolvepath('images/shield_blue_shared.png'))
elseif shieldId == ShieldYellowSharedExp then elseif shieldId == ShieldYellowSharedExp then
self:setSkullTexture(resolvepath('images/shield_yellow_shared.png')) self:setShieldTexture(resolvepath('images/shield_yellow_shared.png'))
elseif shieldId == ShieldBlueNoSharedExpBlink then elseif shieldId == ShieldBlueNoSharedExpBlink then
self:setSkullTexture(resolvepath('images/shield_blue_not_shared.png')) self:setShieldTexture(resolvepath('images/shield_blue_not_shared.png'))
elseif shieldId == ShieldYellowNoSharedExpBlink then elseif shieldId == ShieldYellowNoSharedExpBlink then
self:setSkullTexture(resolvepath('images/shield_yellow_not_shared.png')) self:setShieldTexture(resolvepath('images/shield_yellow_not_shared.png'))
elseif shieldId == ShieldBlueNoSharedExp then elseif shieldId == ShieldBlueNoSharedExp then
self:setSkullTexture(resolvepath('images/shield_blue_not_shared.png')) self:setShieldTexture(resolvepath('images/shield_blue_not_shared.png'))
elseif shieldId == ShieldYellowNoSharedExp then elseif shieldId == ShieldYellowNoSharedExp then
self:setSkullTexture(resolvepath('images/shield_yellow_not_shared.png')) self:setShieldTexture(resolvepath('images/shield_yellow_not_shared.png'))
end end
end end

View File

@ -29,10 +29,10 @@ function Inventory.onSoulChange(soul)
widget:setText("Soul:\n" .. soul) widget:setText("Soul:\n" .. soul)
end end
function Inventory.onInventoryItemMousePress(itemWidget, mousePosition, mouseButton) function Inventory.onInventoryItemMouseRelease(itemWidget, mousePosition, mouseButton)
local item = itemWidget:getItem() local item = itemWidget:getItem()
if item and Game.processMouseAction(mousePosition, mouseButton, nil, item, item, nil, item) then return true end if not item or not itemWidget:containsPoint(mousePosition) then return false end
return false return Game.processMouseAction(mousePosition, mouseButton, nil, item, item, nil, item)
end end
connect(Game, { onLogin = Inventory.create, connect(Game, { onLogin = Inventory.create,

View File

@ -1,5 +1,5 @@
InvetoryItem < Item InvetoryItem < Item
&onMousePress: Inventory.onInventoryItemMousePress &onMouseRelease: Inventory.onInventoryItemMouseRelease
UIWindow UIWindow
width: 192 width: 192