Wow, this is amazing!! How do you get to know stuff like this?? :-D
Could you also think of a way to SetIgnoreParentAlpha() of alert frames that are already shown; i.e. after the resetterFunc has already been fired?
Anyway, thank you so much!
UPDATE: I think I found a way.
Lua Code:
local collectedAlertFrames = {}
local alertFramesIgnoreParentAlpha = false
-- Function I call whenever I toggle UIParent's alpha.
local function SetAlertFramesIgnoreParentAlpha(enable)
alertFramesIgnoreParentAlpha = enable
for _, v in pairs(collectedAlertFrames) do
v:SetIgnoreParentAlpha(enable)
end
end
local function CollectAlertFrame(_, frame)
if not frame.IEF_collected then
tinsert(collectedAlertFrames, frame)
frame.IEF_collected = true
frame:SetIgnoreParentAlpha(alertFramesIgnoreParentAlpha)
end
end
for _, subSystem in pairs(AlertFrame.alertFrameSubSystems) do
local pool = type(subSystem) == 'table' and subSystem.alertFramePool
if type(pool) == 'table' and type(pool.resetterFunc) == 'function' then
hooksecurefunc(pool, "resetterFunc", CollectAlertFrame)
end
end