WoWInterface SVN KuiNameplates

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 149 to Rev 150
    Reverse comparison

Rev 149 → Rev 150

Kui_Nameplates/custom-rename-me.lua
3,41 → 3,37
Rename this file to custom.lua to attach custom code to the addon. Once
renamed, you'll need to completely restart WoW so that it detects the file.
 
Updated 24/12/12:
 
* all functions are now inside the table `c`
 
* RegisterPostFunction calls have been updated, copy and paste the last 4
lines into your custom.lua, overwriting the previous 4 lines.
Updated 14/03/13:
 
* kn is now set using an AceAddon call rather than a global. Copy and paste
the topmost line into your custom.lua, overwriting the previous line.
* Now using AceEvent's RegisterMessage.
 
* Functions are now in the `mod` table.
]]
local kn = LibStub('AceAddon-3.0'):GetAddon('KuiNameplates')
local c = {}
local mod = kn:NewModule('CustomInjector', 'AceEvent-3.0')
 
---------------------------------------------------------------------- Create --
function c:PostCreate(frame)
function mod:PostCreate(msg, frame)
-- Place code to be performed after a frame is created here.
end
 
------------------------------------------------------------------------ Show --
function c:PostShow(frame)
function mod:PostShow(msg, frame)
-- Place code to be performed after a frame is shown here.
end
 
------------------------------------------------------------------------ Hide --
function c:PostHide(frame)
function mod:PostHide(msg, frame)
-- Place code to be performed after a frame is hidden here.
end
 
---------------------------------------------------------------------- Target --
function c:PostTarget(frame)
function mod:PostTarget(msg, frame)
-- Place code to be performed when a frame becomes the player's target here.
end
 
-------------------------------------------------------------------- Register --
kn:RegisterPostFunction('create', c, 'PostCreate')
kn:RegisterPostFunction('show', c, 'PostShow')
kn:RegisterPostFunction('hide', c, 'PostHide')
kn:RegisterPostFunction('target', c, 'PostTarget')
\ No newline at end of file +mod:RegisterMessage('KuiNameplates_PostCreate', 'PostCreate') +mod:RegisterMessage('KuiNameplates_PostShow', 'PostShow') +mod:RegisterMessage('KuiNameplates_PostHide', 'PostHide') +mod:RegisterMessage('KuiNameplates_PostTarget', 'PostTarget') \ No newline at end of file