mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-08 06:30:00 +00:00
actionbar: enable keydown triggers for tbc
This commit is contained in:
@@ -689,10 +689,8 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
|||||||
local exists = _G[button_name] and true or nil
|
local exists = _G[button_name] and true or nil
|
||||||
local f = _G[button_name] or CreateFrame("Button", button_name, parent, ACTIONBAR_SECURE_TEMPLATE_BUTTON)
|
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
|
if not exists then
|
||||||
-- no button available, create a new one
|
|
||||||
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
|
||||||
|
|
||||||
-- prepare the button for vanilla
|
-- prepare the button for vanilla
|
||||||
if not f.HookScript then
|
if not f.HookScript then
|
||||||
f.HookScript = HookScript
|
f.HookScript = HookScript
|
||||||
@@ -780,6 +778,9 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
|||||||
buttoncache[id] = f
|
buttoncache[id] = f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- set keydown option
|
||||||
|
f:RegisterForClicks(C.bars.keydown == "1" and "AnyDown" or "AnyUp")
|
||||||
|
|
||||||
-- set animation
|
-- set animation
|
||||||
f.animation:SetScript("OnUpdate", button_animations[C.bars.animation])
|
f.animation:SetScript("OnUpdate", button_animations[C.bars.animation])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user