This repository has been archived by the owner on May 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--[[--------------------------------------------------------------------------------- | ||
This is a template for the plugin/module system for Clique. | ||
Plugins are typically used to tie Clique to a specific set of unit frames, but | ||
can also be used to add functionality to the system through a manner of hooks. | ||
Plugins are registered with Clique with a shortname that is used for all slash | ||
commands. In addition they are required to have a fullname parameter that is | ||
used in all display messages | ||
----------------------------------------------------------------------------------]] | ||
|
||
local Plugin = Clique:NewModule("pfUI") | ||
Plugin.fullname = "pfUI UnitFrames" | ||
Plugin.url = "https://github.com/shagu/pfUI" | ||
|
||
function Plugin:Test() | ||
return pfUI | ||
end | ||
|
||
function Plugin:OnEnable() | ||
pfUI.uf.ClickActionOld = pfUI.uf.ClickAction | ||
pfUI.uf.ClickAction = Plugin.OnClick | ||
end | ||
|
||
function Plugin:OnDisable() | ||
pfUI.uf.ClickAction = pfUI.uf.ClickActionOld | ||
end | ||
|
||
function Plugin:OnClick() | ||
local button = arg1 | ||
local label = this.label or "" | ||
local id = this.id or "" | ||
local unit = label .. id | ||
|
||
if not Clique:OnClick(button, unit) then | ||
pfUI.uf:ClickActionOld(button) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters