Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (21 sloc) 0.885 kb
local myname, Cork = ...
-- Dynamic mousewheel binding module, originally created by Adirelle <gperreal@free.fr>
local function ClearBindings()
if InCombatLockdown() then return end
ClearOverrideBindings(CorkFrame)
end
function Cork:UpdateMouseBinding(event, unit)
if InCombatLockdown() then return end
if Cork.db.bindwheel and (event ~= "PLAYER_REGEN_DISABLED") and Corkboard:IsVisible() then
SetOverrideBindingClick(CorkFrame, true, 'MOUSEWHEELUP', 'CorkFrame')
SetOverrideBindingClick(CorkFrame, true, 'MOUSEWHEELDOWN', 'CorkFrame')
else
ClearOverrideBindings(CorkFrame)
end
end
local frame = CreateFrame('Frame', nil, Corkboard)
frame:SetScript('OnShow', Cork.UpdateMouseBinding)
frame:SetScript('OnHide', ClearBindings)
frame:SetScript("OnEvent", Cork.UpdateMouseBinding)
frame:RegisterEvent('PLAYER_REGEN_ENABLED')
frame:RegisterEvent('PLAYER_REGEN_DISABLED')
Jump to Line
Something went wrong with that request. Please try again.