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:setId(spellName)
|
||||
icon:setImageSource('/game_cooldown/icons/' .. SpelllistSettings[modules.game_spelllist.getSpelllistProfile()].iconFile)
|
||||
icon:setTooltip(spellformula)
|
||||
icon:setImageClip(modules.game_spelllist.getIconImageClip(otcIconId))
|
||||
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)
|
||||
progressRect:setTooltip(spellName)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ SpellIcon < UIWidget
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
ProgressRect < UIProgressRect
|
||||
SpellProgressRect < UIProgressRect
|
||||
anchors.fill: parent
|
||||
background: #585858AA
|
||||
percent: 100
|
||||
anchors.fill: parent
|
||||
focusable: false
|
||||
|
||||
Panel
|
||||
|
@ -48,7 +48,7 @@ Panel
|
|||
$on:
|
||||
image-clip: 0 20 20 20
|
||||
|
||||
ProgressRect
|
||||
SpellProgressRect
|
||||
id: progressRectAttack
|
||||
anchors.fill: groupIconAttack
|
||||
!tooltip: tr('Attack')
|
||||
|
@ -63,7 +63,7 @@ Panel
|
|||
$on:
|
||||
image-clip: 20 20 20 20
|
||||
|
||||
ProgressRect
|
||||
SpellProgressRect
|
||||
id: progressRectHealing
|
||||
anchors.fill: groupIconHealing
|
||||
!tooltip: tr('Healing')
|
||||
|
@ -78,7 +78,7 @@ Panel
|
|||
$on:
|
||||
image-clip: 40 20 20 20
|
||||
|
||||
ProgressRect
|
||||
SpellProgressRect
|
||||
id: progressRectSupport
|
||||
anchors.fill: groupIconSupport
|
||||
!tooltip: tr('Support')
|
||||
|
@ -93,7 +93,7 @@ Panel
|
|||
$on:
|
||||
image-clip: 60 20 20 20
|
||||
|
||||
ProgressRect
|
||||
SpellProgressRect
|
||||
id: progressRectSpecial
|
||||
anchors.fill: groupIconSpecial
|
||||
!tooltip: tr('Special')
|
||||
|
|
|
@ -29,5 +29,6 @@ Module
|
|||
- game_playermount
|
||||
- game_market
|
||||
- game_spelllist
|
||||
- game_cooldown
|
||||
@onLoad: init()
|
||||
@onUnload: terminate()
|
||||
|
|
Loading…
Reference in New Issue