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("nuf")
14 Plugin.fullname = "Nurfed Unit Frames"
15 Plugin.url = "http://www.nurfedui.net/"
16  
17 -- This plugin currently does not allow any clicks other than Left and Right
18 -- on the main frames. This is waiting for Tivoli to fix.
19  
20 -- Plugin:Test() is called anytime the mod tries to enable. It is optional
21 -- but it will be checked if it exists. Will typically be based off some global
22 -- or the state of the addon itself.
23 function Plugin:Test()
24 return Nurfed_Unit_OnClick
25 end
26  
27 -- Plugin:OnEnable() is called if Plugin:Test() is true, and the mod hasn't been explicitly
28 -- disabled. This is where you should handle all your hooks, etc.
29 function Plugin:OnEnable()
30 self:Hook("Nurfed_Unit_OnClick", "OnClick")
31 end
32  
33 function Plugin:OnClick(button)
34 if not Clique:OnClick(button, this.unit) then
35 return self.hooks.Nurfed_Unit_OnClick.orig(button)
36 end
37 end