Quantcast
WoWInterface - View Single Post - How can i make this load with the game?
View Single Post
05-10-08, 02:52 AM   #10
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Are you sure you need an event to do it, I'm pretty sure you could just do.

Code:
        MainMenuBarLeftEndCap:Hide() 
        MainMenuBarRightEndCap:Hide()
as all Blizzard code is executed before addons (unless it's LOD).

and heres an example of a super simple event handler:

Code:
local function OnEvent(f, event, args)
   if event == <Event 1> then
      --Do stuff
   elseif event == <Event 2> then
      --Do other stuff
   end
end

local f = CreateFrame("Frame")
f:RegisterEvent(<Event 1>)
f:RegisterEvent(<Event 2>)
f:SetScript("OnEvent", OnEvent)

Last edited by Slakah : 05-10-08 at 02:56 AM.
  Reply With Quote