fix party shield, inventory mouse release
This commit is contained in:
parent
e714f9e149
commit
71ed758a3f
|
@ -51,15 +51,15 @@ function Creature:onShieldChange(shieldId)
|
|||
elseif shieldId == ShieldBlueSharedExp then
|
||||
self:setShieldTexture(resolvepath('images/shield_blue_shared.png'))
|
||||
elseif shieldId == ShieldYellowSharedExp then
|
||||
self:setSkullTexture(resolvepath('images/shield_yellow_shared.png'))
|
||||
self:setShieldTexture(resolvepath('images/shield_yellow_shared.png'))
|
||||
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
|
||||
self:setSkullTexture(resolvepath('images/shield_yellow_not_shared.png'))
|
||||
self:setShieldTexture(resolvepath('images/shield_yellow_not_shared.png'))
|
||||
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
|
||||
self:setSkullTexture(resolvepath('images/shield_yellow_not_shared.png'))
|
||||
self:setShieldTexture(resolvepath('images/shield_yellow_not_shared.png'))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ function Inventory.onSoulChange(soul)
|
|||
widget:setText("Soul:\n" .. soul)
|
||||
end
|
||||
|
||||
function Inventory.onInventoryItemMousePress(itemWidget, mousePosition, mouseButton)
|
||||
function Inventory.onInventoryItemMouseRelease(itemWidget, mousePosition, mouseButton)
|
||||
local item = itemWidget:getItem()
|
||||
if item and Game.processMouseAction(mousePosition, mouseButton, nil, item, item, nil, item) then return true end
|
||||
return false
|
||||
if not item or not itemWidget:containsPoint(mousePosition) then return false end
|
||||
return Game.processMouseAction(mousePosition, mouseButton, nil, item, item, nil, item)
|
||||
end
|
||||
|
||||
connect(Game, { onLogin = Inventory.create,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
InvetoryItem < Item
|
||||
&onMousePress: Inventory.onInventoryItemMousePress
|
||||
&onMouseRelease: Inventory.onInventoryItemMouseRelease
|
||||
|
||||
UIWindow
|
||||
width: 192
|
||||
|
|
Loading…
Reference in New Issue