vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --[[---------------------------------------------------------------------------------
2 This is a template for the plugin/module system for Clique.
3  
4 Plugins are typically used to tie Clique to a specific set of unit frames, but
5 can also be used to add functionality to the system through a manner of hooks.
6  
7 Plugins are registered with Clique with a shortname that is used for all slash
8 commands. In addition they are required to have a fullname parameter that is
9 used in all display messages
10 ----------------------------------------------------------------------------------]]
11  
12 -- Create a new plugin for Clique, with the shortname "test"
13 local Plugin = Clique:NewModule("pcuf")
14 Plugin.fullname = "Perl Classic Unit Frames"
15 Plugin.url = "http://www.wowinterface.com/downloads/fileinfo.php?id=4275"
16  
17 -- Plugin:Test() is called anytime the mod tries to enable. It is optional
18 -- but it will be checked if it exists. Will typically be based off some global
19 -- or the state of the addon itself.
20 function Plugin:Test()
21 return Perl_Config_Config
22 end
23  
24 -- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
25 -- disabled. This is where you should handle all your hooks, etc.
26 function Plugin:OnEnable()
27 Perl_Custom_ClickFunction = Plugin.OnClick
28 end
29  
30 -- Plugin:OnDisable() is called if the mod is enabled and its being explicitly disabled.
31 -- This function is optional. If it doesn't exist, Plugin:UnregisterAllEvents() and
32 -- Plugin:UnregisterAllHooks().
33 function Plugin:Disable()
34 Perl_Custom_ClickFunction = nil
35 end
36  
37 function Plugin.OnClick(button,unit)
38 local name = this:GetName()
39 if string.find(name, "Name") then
40 return nil
41 else
42 return Clique:OnClick(button, unit)
43 end
44 end