mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-25 17:16:02 +00:00
unitframes: add clickcasting support for tbc
This commit is contained in:
+25
-2
@@ -898,8 +898,31 @@ function pfUI.uf:EnableScripts()
|
||||
-- handle secure unit button templates (> vanilla)
|
||||
if f.SetAttribute then
|
||||
f.showmenu = pfUI.uf.RightClickAction
|
||||
f:SetAttribute("type1", "target")
|
||||
f:SetAttribute("type2", "showmenu")
|
||||
f:SetAttribute("*type1", "target")
|
||||
f:SetAttribute("*type2", "showmenu")
|
||||
|
||||
if f.config.clickcast == "1" then
|
||||
-- clickcast: shift modifier
|
||||
if pfUI_config.unitframes.clickcast_shift ~= "" then
|
||||
f:SetAttribute("shift-type1", "spell")
|
||||
f:SetAttribute("shift-spell1", pfUI_config.unitframes.clickcast_shift)
|
||||
end
|
||||
-- clickcast: alt modifier
|
||||
if pfUI_config.unitframes.clickcast_alt ~= "" then
|
||||
f:SetAttribute("alt-type1", "spell")
|
||||
f:SetAttribute("alt-spell1", pfUI_config.unitframes.clickcast_alt)
|
||||
end
|
||||
-- clickcast: ctrl modifier
|
||||
if pfUI_config.unitframes.clickcast_ctrl ~= "" then
|
||||
f:SetAttribute("ctrl-type1", "spell")
|
||||
f:SetAttribute("ctrl-spell1", pfUI_config.unitframes.clickcast_ctrl)
|
||||
end
|
||||
-- clickcast: default
|
||||
if pfUI_config.unitframes.clickcast ~= "" then
|
||||
f:SetAttribute("type1", "spell")
|
||||
f:SetAttribute("spell1", pfUI_config.unitframes.clickcast)
|
||||
end
|
||||
end
|
||||
else
|
||||
f:SetScript("OnClick", pfUI.uf.OnClick)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user