actionbar: enable keydown triggers for tbc

This commit is contained in:
shagu
2020-02-19 18:36:25 +01:00
parent fdbf6715dc
commit 459eac8ec8
+4 -3
View File
@@ -689,10 +689,8 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
local exists = _G[button_name] and true or nil
local f = _G[button_name] or CreateFrame("Button", button_name, parent, ACTIONBAR_SECURE_TEMPLATE_BUTTON)
-- no button available, create a new one
if not exists then
-- no button available, create a new one
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
-- prepare the button for vanilla
if not f.HookScript then
f.HookScript = HookScript
@@ -780,6 +778,9 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
buttoncache[id] = f
end
-- set keydown option
f:RegisterForClicks(C.bars.keydown == "1" and "AnyDown" or "AnyUp")
-- set animation
f.animation:SetScript("OnUpdate", button_animations[C.bars.animation])