-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathscrolldown.lua
More file actions
32 lines (27 loc) · 736 Bytes
/
scrolldown.lua
File metadata and controls
32 lines (27 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--[[ Scrolldown Module ]]--
local _, BCM = ...
BCM.modules[#BCM.modules+1] = function()
if bcmDB.BCM_ScrollDown or not GetCVarBool("chatMouseScroll") then return end
local scrollFunc = function(frame, d)
if d > 0 then
if IsShiftKeyDown() then
frame:ScrollToTop()
elseif IsControlKeyDown() then
frame:PageUp()
--else -- Blizz function does this
-- frame:ScrollUp()
end
elseif d < 0 then
if IsShiftKeyDown() then
frame:ScrollToBottom()
elseif IsControlKeyDown() then
frame:PageDown()
--else -- Blizz function does this
-- frame:ScrollDown()
end
end
end
BCM.chatFuncsPerFrame[#BCM.chatFuncsPerFrame+1] = function(cF)
cF:HookScript("OnMouseWheel", scrollFunc)
end
end