mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 19:19:59 +00:00
actionbar: move shift key check to last condition
IsShiftKeyDown() is quite expensive in vanilla, therefore moving it to the last condition to have it execute as less as possible.
This commit is contained in:
@@ -31,13 +31,13 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
|
||||
-- skip if always shift-drag is not enabled
|
||||
if C.bars.shiftdrag ~= "1" then return end
|
||||
|
||||
if IsShiftKeyDown() and drag_await and not drag_active then
|
||||
if drag_await and not drag_active and IsShiftKeyDown() then
|
||||
drag_active = true
|
||||
-- set all buttons to regular on release clicks
|
||||
for id, button in pairs(buttoncache) do
|
||||
button:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
end
|
||||
elseif not IsShiftKeyDown() and drag_active then
|
||||
elseif drag_active and not IsShiftKeyDown() then
|
||||
drag_active = nil
|
||||
-- set all buttons back to their defaults
|
||||
for id, button in pairs(buttoncache) do
|
||||
|
||||
Reference in New Issue
Block a user