From 459eac8ec831752fef78c8a464b6be3c0d8ccb68 Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 19 Feb 2020 18:36:25 +0100 Subject: [PATCH] actionbar: enable keydown triggers for tbc --- modules/actionbar.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 6ac861a7..f6545c83 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -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])