I’m really hoping to avoid a GWOT (yeah, I know).
function f:CooldownLayer(deviceName, keyName)
local actionSlot = tonumber(AOS.BoundButtons[deviceName][keyName])
local iconFrameName = keyName.."_ICON"
local cdFrameName = keyName.."_CD"
local cd = _G[cdFrameName]
local cdTexture = _G[cdFrameName.."_TEXTURE"]
local icon = _G[iconFrameName]
if cd then
cd:ClearAllPoints()
cd:SetHeight(icon:GetHeight())
cd:SetWidth(icon:GetWidth())
cdTexture:SetTexture(f:IconTextureOrString(deviceName, keyName))
cd:Show()
else
local cd = CreateFrame("Cooldown", cdFrameName, icon)
cd:SetFrameStrata(icon:GetFrameStrata())
cd:SetHeight(icon:GetHeight())
cd:SetWidth(icon:GetWidth())
local cdTexture = cd:CreateTexture(cdFrameName.."_TEXTURE")
cdTexture:SetTexture(f:IconTextureOrString(deviceName, keyName))
cdTexture:SetAllPoints(cd)
cd.texture = cdTexture
cd:SetPoint("center", icon)
cd:Show()
end
end
Anything jump out at you about this?
The “icon” layer shows just fine. The cooldown layer gets created and updated (verified using VDT) but doesn’t appear on the screen.
So far as I can tell from VDT, every element is in place.
I’ve got height, width, anchor points, a texture, time elements in the relevant cooldown frames (not shown here - trying to avoid that GWOT - they’re there in my tests).
Everything seems to be in place except it doesn’t show on the screen.
What am I missing?
I’ll be happy to post more code, but this thing is . . . it’s not short.
Edited to add: https://imgur.com/a/hdFEhc9