mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
unitframes: unify onclick function
This commit is contained in:
+2
-36
@@ -42,42 +42,8 @@ pfUI:RegisterModule("target", function ()
|
||||
end)
|
||||
|
||||
pfUI.uf.target:SetScript("OnClick", function ()
|
||||
if arg1 == "RightButton" then
|
||||
ToggleDropDownMenu(1, nil, TargetFrameDropDown, "cursor")
|
||||
else
|
||||
if pfUI_config.unitframes.globalclick == "0" then return end
|
||||
|
||||
-- clickcast: shift modifier
|
||||
if IsShiftKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_shift ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast_shift)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
return
|
||||
end
|
||||
-- clickcast: alt modifier
|
||||
elseif IsAltKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_alt ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast_alt)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
return
|
||||
end
|
||||
-- clickcast: ctrl modifier
|
||||
elseif IsControlKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_ctrl ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast_ctrl)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
return
|
||||
end
|
||||
-- clickcast: default
|
||||
else
|
||||
if pfUI_config.unitframes.raid.clickcast ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
pfUI.uf:ClickAction(arg1)
|
||||
end)
|
||||
|
||||
pfUI.uf.target:RegisterEvent("RAID_TARGET_UPDATE")
|
||||
pfUI.uf.target:RegisterEvent("PARTY_LEADER_CHANGED")
|
||||
|
||||
Reference in New Issue
Block a user