WoWInterface SVN KuiNameplates

Compare Revisions

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

Rev 150 → Rev 149

Kui_Nameplates/custom-rename-me.lua
3,37 → 3,41
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 14/03/13:
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.
 
* Now using AceEvent's RegisterMessage.
 
* Functions are now in the `mod` table.
* 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.
]]
local kn = LibStub('AceAddon-3.0'):GetAddon('KuiNameplates')
local mod = kn:NewModule('CustomInjector', 'AceEvent-3.0')
local c = {}
 
---------------------------------------------------------------------- Create --
function mod:PostCreate(msg, frame)
function c:PostCreate(frame)
-- Place code to be performed after a frame is created here.
end
 
------------------------------------------------------------------------ Show --
function mod:PostShow(msg, frame)
function c:PostShow(frame)
-- Place code to be performed after a frame is shown here.
end
 
------------------------------------------------------------------------ Hide --
function mod:PostHide(msg, frame)
function c:PostHide(frame)
-- Place code to be performed after a frame is hidden here.
end
 
---------------------------------------------------------------------- Target --
function mod:PostTarget(msg, frame)
function c:PostTarget(frame)
-- Place code to be performed when a frame becomes the player's target here.
end
 
-------------------------------------------------------------------- Register --
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 +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