chat: add scroll speed option

This commit is contained in:
William Gunter
2017-10-12 21:06:25 +02:00
committed by shagu
parent 4300d5472a
commit 2210e6c904
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -480,6 +480,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("chat", "global", "sticky", "1")
pfUI:UpdateConfig("chat", "global", "fadeout", "0")
pfUI:UpdateConfig("chat", "global", "fadetime", "300")
pfUI:UpdateConfig("chat", "global", "scrollspeed", "1")
pfUI:UpdateConfig("nameplates", nil, "use_unitfonts", "0")
pfUI:UpdateConfig("nameplates", nil, "overlap", "0")
+6 -2
View File
@@ -387,13 +387,17 @@ pfUI:RegisterModule("chat", function ()
if IsShiftKeyDown() then
frame:ScrollToTop()
else
frame:ScrollUp()
for i=1, C.chat.global.scrollspeed do
frame:ScrollUp()
end
end
elseif (arg1 < 0) then
if IsShiftKeyDown() then
frame:ScrollToBottom()
else
frame:ScrollDown()
for i=1, C.chat.global.scrollspeed do
frame:ScrollDown()
end
end
end
end)
+1
View File
@@ -1293,6 +1293,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(this, T["Enable Sticky Chat"], C.chat.global, "sticky", "checkbox")
CreateConfig(this, T["Enable Chat Fade"], C.chat.global, "fadeout", "checkbox")
CreateConfig(this, T["Seconds Before Chat Fade"], C.chat.global, "fadetime")
CreateConfig(this, T["Mousewheel Scroll Speed"], C.chat.global, "scrollspeed")
this.setup = true
end
end)