/
--[[ |
ChatScroll |
author: AnduinLothar <karlkfi@cosmosui.org> |
author: AnduinLothar <karlkfi@yahoo.com> |
-ChatFrame Mouse Wheel Scroll |
Change List |
v3.4 |
- Updates for WoW 4.0.1 |
v3.3 |
- Added a Scroll Speed slider |
(If you're not using Portfolio manually set ChatScroll_SavedVars.ScrollSpeed to a number > 0) |
end |
else |
if ( value > 0 ) then |
for i=1, ChatScroll_SavedVars.ScrollSpeed do |
-- FloatingChatFrame_OnMouseScroll already called ScrollUp once |
for i=2, ChatScroll_SavedVars.ScrollSpeed do |
chatframe:ScrollUp(); |
end |
elseif ( value < 0 ) then |
for i=1, ChatScroll_SavedVars.ScrollSpeed do |
-- FloatingChatFrame_OnMouseScroll already called ScrollDown once |
for i=2, ChatScroll_SavedVars.ScrollSpeed do |
chatframe:ScrollDown(); |
end |
end |
end |
else |
if ( value > 0 ) then |
ActionBar_PageUp(); |
elseif ( value < 0 ) then |
ActionBar_PageDown(); |
end |
end |
end |
ChatFrameMenuButton:Show() |
end |
local frameName, up, down, bottom |
local frameName, button |
for i=1, NUM_CHAT_WINDOWS do |
frameName = "ChatFrame"..i |
up = getglobal(frameName.."UpButton") |
down = getglobal(frameName.."DownButton") |
bottom = getglobal(frameName.."BottomButton") |
button = _G[frameName.."ButtonFrame"] |
if hidden then |
up:Hide() |
down:Hide() |
bottom:Hide() |
button:Hide() |
else |
up:Show() |
down:Show() |
bottom:Show() |
button:Show() |
end |
end |
end |
end |
hooksecurefunc(ChatFrameMenuButton, "Show", ScrollButton_OnShow) |
for i=1, NUM_CHAT_WINDOWS do |
local frameName = "ChatFrame"..i |
hooksecurefunc(_G[frameName.."UpButton"], "Show", ScrollButton_OnShow) |
hooksecurefunc(_G[frameName.."DownButton"], "Show", ScrollButton_OnShow) |
hooksecurefunc(_G[frameName.."BottomButton"], "Show", ScrollButton_OnShow) |
local frame = _G[frameName]; |
frame:EnableMouseWheel(1); |
if (type(frame:GetScript("OnMouseWheel")) == "function") then |
frame:HookScript("OnMouseWheel", ChatScroll.OnMouseWheel); |
else |
frame:SetScript("OnMouseWheel", ChatScroll.OnMouseWheel); |
end |
hooksecurefunc(_G["ChatFrame"..i.."ButtonFrame"], "Show", ScrollButton_OnShow) |
end |
hooksecurefunc("FloatingChatFrame_OnMouseScroll", ChatScroll.OnMouseWheel) |
-- <= == == == == == == == == == == == == => |
-- => Portfolio GUI Config |
## Interface: 30100 |
## Interface: 40000 |
## Title: ChatScroll |
## Title-deDE: Chat Scroll |
## Notes: Makes chat windows scrollable with the mouse wheel and has scroll button visibility options. |
## Author: AnduinLothar |
## OptionalDeps: Portfolio, LibDefaults |
## SavedVariables: ChatScroll_SavedVars, meh |
## Version: 3.3 |
## X-Date: Oct 25 2008 |
## Version: 3.4 |
## X-Date: Oct 27 2010 |
## X-Category: Chat |
## X-Website: http://www.wowinterface.com/downloads/info5359-ChatScroll.html |
## X-Email: karlkfi@yahoo.com |