Fix loading, style, tooltip
This commit is contained in:
		
							parent
							
								
									ba407072a5
								
							
						
					
					
						commit
						c0a3b083f6
					
				|  | @ -66,12 +66,12 @@ function onSpellCooldown(iconId, duration) | ||||||
|     icon = g_ui.createWidget('SpellIcon', spellCooldownPanel) |     icon = g_ui.createWidget('SpellIcon', spellCooldownPanel) | ||||||
|     icon:setId(spellName) |     icon:setId(spellName) | ||||||
|     icon:setImageSource('/game_cooldown/icons/' .. SpelllistSettings[modules.game_spelllist.getSpelllistProfile()].iconFile) |     icon:setImageSource('/game_cooldown/icons/' .. SpelllistSettings[modules.game_spelllist.getSpelllistProfile()].iconFile) | ||||||
|     icon:setTooltip(spellformula) |  | ||||||
|     icon:setImageClip(modules.game_spelllist.getIconImageClip(otcIconId)) |     icon:setImageClip(modules.game_spelllist.getIconImageClip(otcIconId)) | ||||||
| 	icon.event = scheduleEvent(function() icon:destroy() end, duration) | 	icon.event = scheduleEvent(function() icon:destroy() end, duration) | ||||||
| 	 | 	 | ||||||
| 	local progressRect = g_ui.createWidget('ProgressRect', icon) | 	local progressRect = g_ui.createWidget('SpellProgressRect', icon) | ||||||
| 	updateProgressRect(progressRect, duration/25, true) | 	updateProgressRect(progressRect, duration/25, true) | ||||||
|  |     progressRect:setTooltip(spellName) | ||||||
|   end |   end | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -17,10 +17,10 @@ SpellIcon < UIWidget | ||||||
|     anchors.top: parent.top |     anchors.top: parent.top | ||||||
|     anchors.left: parent.left |     anchors.left: parent.left | ||||||
| 
 | 
 | ||||||
| ProgressRect < UIProgressRect | SpellProgressRect < UIProgressRect | ||||||
|  |   anchors.fill: parent | ||||||
|   background: #585858AA |   background: #585858AA | ||||||
|   percent: 100 |   percent: 100 | ||||||
|   anchors.fill: parent |  | ||||||
|   focusable: false |   focusable: false | ||||||
|    |    | ||||||
| Panel | Panel | ||||||
|  | @ -48,7 +48,7 @@ Panel | ||||||
|     $on: |     $on: | ||||||
|       image-clip: 0 20 20 20 |       image-clip: 0 20 20 20 | ||||||
| 
 | 
 | ||||||
|   ProgressRect |   SpellProgressRect | ||||||
|     id: progressRectAttack |     id: progressRectAttack | ||||||
|     anchors.fill: groupIconAttack |     anchors.fill: groupIconAttack | ||||||
|     !tooltip: tr('Attack') |     !tooltip: tr('Attack') | ||||||
|  | @ -63,7 +63,7 @@ Panel | ||||||
|     $on: |     $on: | ||||||
|       image-clip: 20 20 20 20 |       image-clip: 20 20 20 20 | ||||||
| 
 | 
 | ||||||
|   ProgressRect |   SpellProgressRect | ||||||
|     id: progressRectHealing |     id: progressRectHealing | ||||||
|     anchors.fill: groupIconHealing |     anchors.fill: groupIconHealing | ||||||
|     !tooltip: tr('Healing') |     !tooltip: tr('Healing') | ||||||
|  | @ -78,7 +78,7 @@ Panel | ||||||
|     $on: |     $on: | ||||||
|       image-clip: 40 20 20 20 |       image-clip: 40 20 20 20 | ||||||
| 
 | 
 | ||||||
|   ProgressRect |   SpellProgressRect | ||||||
|     id: progressRectSupport |     id: progressRectSupport | ||||||
|     anchors.fill: groupIconSupport |     anchors.fill: groupIconSupport | ||||||
|     !tooltip: tr('Support') |     !tooltip: tr('Support') | ||||||
|  | @ -93,7 +93,7 @@ Panel | ||||||
|     $on: |     $on: | ||||||
|       image-clip: 60 20 20 20 |       image-clip: 60 20 20 20 | ||||||
| 
 | 
 | ||||||
|   ProgressRect |   SpellProgressRect | ||||||
|     id: progressRectSpecial |     id: progressRectSpecial | ||||||
|     anchors.fill: groupIconSpecial |     anchors.fill: groupIconSpecial | ||||||
|     !tooltip: tr('Special') |     !tooltip: tr('Special') | ||||||
|  |  | ||||||
|  | @ -29,5 +29,6 @@ Module | ||||||
|     - game_playermount |     - game_playermount | ||||||
|     - game_market |     - game_market | ||||||
|     - game_spelllist |     - game_spelllist | ||||||
|  |     - game_cooldown | ||||||
|   @onLoad: init() |   @onLoad: init() | ||||||
|   @onUnload: terminate() |   @onUnload: terminate() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Samuel
						Samuel