Skip to content
This repository was archived by the owner on May 14, 2023. It is now read-only.

Commit a5ee56c

Browse files
committed
add support for pfUI-UnitFrames
1 parent df7d567 commit a5ee56c

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

Plugins/Clique_pfUI.lua

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
local Plugin = Clique:NewModule("pfUI")
13+
Plugin.fullname = "pfUI UnitFrames"
14+
Plugin.url = "https://github.com/shagu/pfUI"
15+
16+
function Plugin:Test()
17+
return pfUI
18+
end
19+
20+
function Plugin:OnEnable()
21+
pfUI.uf.ClickActionOld = pfUI.uf.ClickAction
22+
pfUI.uf.ClickAction = Plugin.OnClick
23+
end
24+
25+
function Plugin:OnDisable()
26+
pfUI.uf.ClickAction = pfUI.uf.ClickActionOld
27+
end
28+
29+
function Plugin:OnClick()
30+
local button = arg1
31+
local label = this.label or ""
32+
local id = this.id or ""
33+
local unit = label .. id
34+
35+
if not Clique:OnClick(button, unit) then
36+
pfUI.uf:ClickActionOld(button)
37+
end
38+
end

Plugins/Plugins.xml

+1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@
3434
<Script file="Clique_WatchDog.lua"/>
3535
<Script file="Clique_XPerl.lua"/>
3636
<Script file="Clique_AofHeal.lua"/>
37+
<Script file="Clique_pfUI.lua"/>
3738
</Ui>

0 commit comments

Comments
 (0)