Enable mousewheel events as well as clicks
James Whitehead II [07-29-11 - 07:06]
Enable mousewheel events as well as clicks
This was previously only working on frames that registered using the
RegisterFrame or ClickCastFrames mechanism.
diff --git a/Clique.lua b/Clique.lua
index d994f70..05630f0 100755
--- a/Clique.lua
+++ b/Clique.lua
@@ -831,6 +831,8 @@ function addon:IsFrameBlacklisted(frame)
return self.settings.blacklist[name]
end
+-- Update both registered clicks, and ensure that mousewheel events are enabled
+-- on the frame.
function addon:UpdateRegisteredClicks(button)
if InCombatLockdown() then
table.insert(self.regclickqueue, button)
@@ -842,18 +844,21 @@ function addon:UpdateRegisteredClicks(button)
-- Short version that only updates clicks for one frame
if button and not self:IsFrameBlacklisted(button) then
button:RegisterForClicks(direction)
+ button:EnableMouseWheel(true)
return
end
for button in pairs(self.ccframes) do
if not self:IsFrameBlacklisted(button) then
button:RegisterForClicks(direction)
+ button:EnableMouseWheel(true)
end
end
for name, button in pairs(self.hccframes) do
if not self:IsFrameBlacklisted(button) then
button:RegisterForClicks(direction)
+ button:EnableMouseWheel(true)
end
end
end