Originally Posted by 10leej
Also need to find a way to index the buff/debuff icons for !Beautycase
|
Somewhere:
Code:
local function Aura_PostCreateIcon(element, button)
-- Do your thing with "button" here.
end
In your Spawn function:
Code:
Buffs.PostCreateIcon = Aura_PostCreateIcon
Debuffs.PostCreateIcon = Aura_PostCreateIcon
Feel free to look at oUF_Phanx to see exactly what I'm doing to skin the aura buttons. In particular, you will probably want to nuke the overlay texture, and remap its SetVertexColor method to color your border instead. You may also want to reparent some stuff to the cooldown model when it's shown, so it's easier to see.
Actually, I'll just post mine here so you don't have to dig around. Green parts are specific to my layout and/or border implementation.
Code:
local noop = function() end
local function AuraIconCD_OnShow(cd)
-- Reparent the border textures and stack count to the cooldown so they're on top of it.
local button = cd:GetParent()
button:SetBorderParent(cd)
button.count:SetParent(cd)
end
local function AuraIconCD_OnHide(cd)
-- Reparent the border textures and stack count back to the button so they're not hidden.
local button = cd:GetParent()
button:SetBorderParent(button)
button.count:SetParent(button)
end
local function AuraIconOverlay_SetBorderColor(overlay, r, g, b)
-- Color the border instead of the unwanted overlay thingy.
if not r or not g or not b then
local color = ns.config.borderColor
r, g, b = color[1], color[2], color[3]
end
overlay:GetParent():SetBorderColor(r, g, b)
end
function ns.PostCreateAuraIcon(element, button)
-- A button is born! Do all the things!
ns.CreateBorder(button, 12)
button.cd:SetReverse(true)
button.cd:SetScript("OnHide", AuraIconCD_OnHide)
button.cd:SetScript("OnShow", AuraIconCD_OnShow)
if button.cd:IsShown() then
AuraIconCD_OnShow(button.cd)
end
button.icon:SetTexCoord(0.03, 0.97, 0.03, 0.97)
button.overlay:Hide()
button.overlay.Hide = AuraIconOverlay_SetBorderColor
button.overlay.SetVertexColor = AuraIconOverlay_SetBorderColor
button.overlay.Show = noop
end