View Single Post
05-15-16, 02:38 PM   #5
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Originally Posted by lucro View Post
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:
  1. hooksecurefunc(AchievementAlertSystem,"ShowAlert",function()
  2.             local achievementAlertPool = AchievementAlertSystem.alertFramePool
  3.                 for alertFrame in achievementAlertPool:EnumerateActive() do
  4.                     alertFrame.Icon:Hide()
  5.                     alertFrame.Background:ClearAllPoints()
  6.                     alertFrame.Background:SetSize(512,64)
  7.                     alertFrame.Background:SetTexCoord(0,1,1,0)
  8.                     alertFrame.Background:SetParent(alertFrame)
  9.                     alertFrame.Background:SetPoint("Center",29,1)
  10.                     alertFrame.Background:SetTexture("Interface\\Achievementframe\\miirgui_ach.tga")
  11.  
  12.                     alertFrame.Unlocked:SetTextColor(unpack(miirgui.Color))
  13.                     alertFrame.Unlocked:SetFont(unpack(miirgui.small))
  14.                     alertFrame.Unlocked:SetShadowColor(0,0,0,0)
  15.  
  16.                     alertFrame.Name:SetTextColor(1,1,1,1)
  17.                     alertFrame.Name:SetFont(unpack(miirgui.medium))
  18.                     alertFrame.Name:SetShadowColor(0,0,0,0)
  19.                 end
  20.         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.
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘