Browse Source

Updated advernturer blessing inventory style to be more robust

TheSumm 6 years ago
parent
commit
fc76ca4523

BIN
data/images/game/slots/ammo-blessed.png View File


BIN
data/images/game/slots/back-blessed.png View File


BIN
data/images/game/slots/body-blessed.png View File


BIN
data/images/game/slots/feet-blessed.png View File


BIN
data/images/game/slots/finger-blessed.png View File


BIN
data/images/game/slots/head-blessed.png View File


BIN
data/images/game/slots/left-hand-blessed.png View File


BIN
data/images/game/slots/legs-blessed.png View File


BIN
data/images/game/slots/neck-blessed.png View File


BIN
data/images/game/slots/right-hand-blessed.png View File


BIN
data/images/ui/item-blessed.png View File


+ 2
- 8
modules/game_inventory/inventory.lua View File

@@ -62,13 +62,7 @@ function toggleAdventurerStyle(hasBlessing)
62 62
   for slot = InventorySlotFirst, InventorySlotLast do
63 63
     local itemWidget = inventoryPanel:getChildById('slot' .. slot)
64 64
     if itemWidget then
65
-      if hasBlessing then
66
-        itemWidget:setBorderWidth(1)
67
-        itemWidget:setBorderColor('#F7C80C')
68
-      else
69
-        itemWidget:setBorderWidth(0)
70
-        itemWidget:setBorderColor('white')
71
-      end
65
+      itemWidget:setOn(hasBlessing)
72 66
     end
73 67
   end
74 68
 end
@@ -114,7 +108,7 @@ function onInventoryChange(player, slot, item, oldItem)
114 108
 
115 109
   local itemWidget = inventoryPanel:getChildById('slot' .. slot)
116 110
   if item then
117
-    itemWidget:setStyle('Item')
111
+    itemWidget:setStyle('InventoryItem')
118 112
     itemWidget:setItem(item)
119 113
   else
120 114
     itemWidget:setStyle(InventorySlotStyles[slot])

+ 22
- 0
modules/game_inventory/inventory.otui View File

@@ -1,54 +1,76 @@
1 1
 InventoryItem < Item
2
+  $on:
3
+    image-source: /images/ui/item-blessed
2 4
 
3 5
 HeadSlot < InventoryItem
4 6
   id: slot1
5 7
   image-source: /images/game/slots/head
6 8
   &position: {x=65535, y=1, z=0}
9
+  $on:
10
+    image-source: /images/game/slots/head-blessed
7 11
 
8 12
 BodySlot < InventoryItem
9 13
   id: slot4
10 14
   image-source: /images/game/slots/body
11 15
   &position: {x=65535, y=4, z=0}
16
+  $on:
17
+    image-source: /images/game/slots/body-blessed
12 18
 
13 19
 LegSlot < InventoryItem
14 20
   id: slot7
15 21
   image-source: /images/game/slots/legs
16 22
   &position: {x=65535, y=7, z=0}
23
+  $on:
24
+    image-source: /images/game/slots/legs-blessed
17 25
 
18 26
 FeetSlot < InventoryItem
19 27
   id: slot8
20 28
   image-source: /images/game/slots/feet
21 29
   &position: {x=65535, y=8, z=0}
30
+  $on:
31
+    image-source: /images/game/slots/feet-blessed
22 32
 
23 33
 NeckSlot < InventoryItem
24 34
   id: slot2
25 35
   image-source: /images/game/slots/neck
26 36
   &position: {x=65535, y=2, z=0}
37
+  $on:
38
+    image-source: /images/game/slots/neck-blessed
27 39
 
28 40
 LeftSlot < InventoryItem
29 41
   id: slot6
30 42
   image-source: /images/game/slots/left-hand
31 43
   &position: {x=65535, y=6, z=0}
44
+  $on:
45
+    image-source: /images/game/slots/left-hand-blessed
32 46
 
33 47
 FingerSlot < InventoryItem
34 48
   id: slot9
35 49
   image-source: /images/game/slots/finger
36 50
   &position: {x=65535, y=9, z=0}
51
+  $on:
52
+    image-source: /images/game/slots/finger-blessed
37 53
 
38 54
 BackSlot < InventoryItem
39 55
   id: slot3
40 56
   image-source: /images/game/slots/back
41 57
   &position: {x=65535, y=3, z=0}
58
+  $on:
59
+    image-source: /images/game/slots/back-blessed
42 60
 
43 61
 RightSlot < InventoryItem
44 62
   id: slot5
45 63
   image-source: /images/game/slots/right-hand
46 64
   &position: {x=65535, y=5, z=0}
65
+  $on:
66
+    image-source: /images/game/slots/right-hand-blessed
47 67
 
48 68
 AmmoSlot < InventoryItem
49 69
   id: slot10
50 70
   image-source: /images/game/slots/ammo
51 71
   &position: {x=65535, y=10, z=0}
72
+  $on:
73
+    image-source: /images/game/slots/ammo-blessed
52 74
 
53 75
 PurseButton < Button
54 76
   id: purseButton

+ 1
- 0
src/client/creature.cpp View File

@@ -705,6 +705,7 @@ void Creature::setBaseSpeed(double baseSpeed)
705 705
         callLuaField("onBaseSpeedChange", baseSpeed, oldBaseSpeed);
706 706
     }
707 707
 }
708
+
708 709
 void Creature::setSkull(uint8 skull)
709 710
 {
710 711
     m_skull = skull;

Loading…
Cancel
Save