Browse Source

fix party shield, inventory mouse release

Henrique Santiago 9 years ago
parent
commit
71ed758a3f

+ 5
- 5
modules/game/creature.lua View File

@@ -51,15 +51,15 @@ function Creature:onShieldChange(shieldId)
51 51
   elseif shieldId == ShieldBlueSharedExp then
52 52
     self:setShieldTexture(resolvepath('images/shield_blue_shared.png'))
53 53
   elseif shieldId == ShieldYellowSharedExp then
54
-    self:setSkullTexture(resolvepath('images/shield_yellow_shared.png'))
54
+    self:setShieldTexture(resolvepath('images/shield_yellow_shared.png'))
55 55
   elseif shieldId == ShieldBlueNoSharedExpBlink then
56
-    self:setSkullTexture(resolvepath('images/shield_blue_not_shared.png'))
56
+    self:setShieldTexture(resolvepath('images/shield_blue_not_shared.png'))
57 57
   elseif shieldId == ShieldYellowNoSharedExpBlink then
58
-    self:setSkullTexture(resolvepath('images/shield_yellow_not_shared.png'))
58
+    self:setShieldTexture(resolvepath('images/shield_yellow_not_shared.png'))
59 59
   elseif shieldId == ShieldBlueNoSharedExp then
60
-    self:setSkullTexture(resolvepath('images/shield_blue_not_shared.png'))
60
+    self:setShieldTexture(resolvepath('images/shield_blue_not_shared.png'))
61 61
   elseif shieldId == ShieldYellowNoSharedExp then
62
-    self:setSkullTexture(resolvepath('images/shield_yellow_not_shared.png'))
62
+    self:setShieldTexture(resolvepath('images/shield_yellow_not_shared.png'))
63 63
   end
64 64
 end
65 65
 

+ 3
- 3
modules/game_inventory/inventory.lua View File

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

+ 1
- 1
modules/game_inventory/inventory.otui View File

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

Loading…
Cancel
Save