Originally Posted by lucro
The frames won't be created until they're needed, so it may be sufficient to just hook the setup function AchievementAlertFrame_SetUp and adjust it there.
|
I got it working like this:
Lua Code:
hooksecurefunc(AchievementAlertSystem,"ShowAlert",function()
local achievementAlertPool = AchievementAlertSystem.alertFramePool
for alertFrame in achievementAlertPool:EnumerateActive() do
alertFrame.Icon:Hide()
alertFrame.Background:ClearAllPoints()
alertFrame.Background:SetSize(512,64)
alertFrame.Background:SetTexCoord(0,1,1,0)
alertFrame.Background:SetParent(alertFrame)
alertFrame.Background:SetPoint("Center",29,1)
alertFrame.Background:SetTexture("Interface\\Achievementframe\\miirgui_ach.tga")
alertFrame.Unlocked:SetTextColor(unpack(miirgui.Color))
alertFrame.Unlocked:SetFont(unpack(miirgui.small))
alertFrame.Unlocked:SetShadowColor(0,0,0,0)
alertFrame.Name:SetTextColor(1,1,1,1)
alertFrame.Name:SetFont(unpack(miirgui.medium))
alertFrame.Name:SetShadowColor(0,0,0,0)
end
end)
I do not know if it's the best method, but it works just fine
. I tried hooking the setup function, but the hook did not seem to fire.