mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-31 16:06:57 +00:00
Give spellbook buttons a native Cooldown and fix the bag slot one
Spell buttons kept the template's indicator Model for their sweep. The
Spellbook skin now creates a native Cooldown for each one.
Taking the "<button>Cooldown" name was meant to point the FrameXML
lookups at the new frame, but 1.12 binds a frame's name only while that
global is unset. The bag slot Cooldowns from a721f788 were never used:
ContainerFrame_UpdateCooldown still drove the Model, so bags lost their
timer text, ignored Reverse Cooldown Animation and were hidden by Hide
Foreign Cooldown Animations. Both places now rebind the global by hand.
This commit is contained in:
@@ -33,6 +33,14 @@ pfUI:RegisterSkin("Spellbook", function ()
|
||||
StripTextures(button)
|
||||
SkinButton(button, nil, nil, nil, texture)
|
||||
|
||||
-- native cooldown frame in place of the template's indicator Model.
|
||||
-- SpellButton_UpdateButton reads the "<button>Cooldown" global on every
|
||||
-- update. 1.12 binds a frame's name only while that global is unset, so
|
||||
-- the global is rebound by hand; the Model starts hidden and nothing
|
||||
-- reaches it after that
|
||||
local cdname = "SpellButton"..i.."Cooldown"
|
||||
_G[cdname] = CreateFrame("Cooldown", cdname, button, "CooldownFrameTemplate")
|
||||
|
||||
_G["SpellButton"..i.."SubSpellName"]:SetTextColor(1, 1, 1)
|
||||
_G["SpellButton"..i.."AutoCastable"]:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay")
|
||||
_G["SpellButton"..i.."Highlight"]:SetTexture("")
|
||||
|
||||
Reference in New Issue
Block a user