WoWInterface SVN ChatScroll

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 1 to Rev 2
    Reverse comparison

Rev 1 → Rev 2

trunk/ChatScroll/Bindings.xml New file
0,0 → 1,5
<Bindings>
<Binding name="CHATSCROLL_TOP" description="Scroll To Top" header="CHATSCROLL_HEADER">
ChatScroll.ScrollToTop();
</Binding>
</Bindings>
\ No newline at end of file
trunk/ChatScroll/ChatScroll.lua New file
0,0 → 1,157
--------------------------------------------------------------------------
-- ChatScroll.lua
--------------------------------------------------------------------------
--[[
ChatScroll
 
author: AnduinLothar <karlkfi@cosmosui.org>
 
-ChatFrame Mouse Wheel Scroll
 
Change List
v3.0
- Updated for WoW 3.0
- Added Portfolio Options, Removed Khaos Options
v2.2
- Added "Hide Chat Frame Scroll Buttons" Option
- Cleaned up the code
v2.1
- Prepared for Lua 5.1
- Removed Localization usage
v2.0
- No longer uses hidden frames, now uses script element hooks
- No longer supports PopUI or TransUI, I recomend using VisibilityOptions to hide the buttons.
- Added Shift-MouseWheelUp to to to the top of the chat window
- Added Shift-MouseWheelDown to to to the bottom of the chat window
- Added Scroll to Top Binding
v1.1
- Fixed negative framelevel bug in new patch
- Updated the TOC to 1300.
v1.1
- Initial Release
 
$Date: 2007-07-03 21:22:03 -0500 (Tue, 03 Jul 2007) $
$Rev: 5009 $
 
]]--
 
-- <= == == == == == == == == == == == == =>
-- => Function Definition
-- <= == == == == == == == == == == == == =>
 
ChatScroll = {};
 
-- For manually changing settings use these two variables (these will not override Khaos settings)
ChatScroll.Enabled = true;
ChatScroll.Hide_Buttons = false;
 
function ChatScroll.OnMouseWheel(chatframe, value)
if ( ChatScroll.Enabled ) then
if ( IsShiftKeyDown() ) then
if ( value > 0 ) then
chatframe:ScrollToTop()
elseif ( value < 0 ) then
chatframe:ScrollToBottom();
end
else
if ( value > 0 ) then
chatframe:ScrollUp();
elseif ( value < 0 ) then
chatframe:ScrollDown();
end
end
else
if ( value > 0 ) then
ActionBar_PageUp();
elseif ( value < 0 ) then
ActionBar_PageDown();
end
end
end
 
function ChatScroll.ScrollToTop()
SELECTED_DOCK_FRAME:ScrollToTop();
end
 
function ChatScroll.UpdateScrollButtons()
ChatScroll.SetScrollButtonVisibility(ChatScroll.Hide_Buttons)
end
 
function ChatScroll.SetScrollButtonVisibility(toggle)
if (toggle) then
ChatScroll.Hide_Buttons = true;
ChatFrameMenuButton:Hide()
else
ChatScroll.Hide_Buttons = false;
ChatFrameMenuButton:Show()
end
 
local frameName
for i=1, NUM_CHAT_WINDOWS do
frameName = "ChatFrame"..i
if (toggle) then
getglobal(frameName.."UpButton"):Hide()
getglobal(frameName.."DownButton"):Hide()
getglobal(frameName.."BottomButton"):Hide()
else
getglobal(frameName.."UpButton"):Show()
getglobal(frameName.."DownButton"):Show()
getglobal(frameName.."BottomButton"):Show()
end
end
end
 
function ChatScroll.SetScrollEnabled(toggle)
ChatScroll.Enabled = toggle;
end
 
-- <= == == == == == == == == == == == == =>
-- => Execution
-- <= == == == == == == == == == == == == =>
 
-- Set up hooks
for i=1, NUM_CHAT_WINDOWS do
local frame = getglobal("ChatFrame"..i);
frame:EnableMouseWheel(1);
if (type(frame:GetScript("OnMouseWheel")) == "function") then
frame:HookScript("OnMouseWheel", ChatScroll.OnMouseWheel);
else
frame:SetScript("OnMouseWheel", ChatScroll.OnMouseWheel);
end
end
hooksecurefunc("FCF_UpdateButtonSide", ChatScroll.UpdateScrollButtons);
 
-- Update Button Visibility
ChatScroll.SetScrollButtonVisibility(ChatScroll.Hide_Buttons)
 
-- Register with Portfolio
if (Portfolio) then
local optionSet = {
id="ChatScroll";
text=CHATSCROLL_CONFIG_HEADER;
helptext=CHATSCROLL_CONFIG_HEADER_INFO;
options={
{
id="EnableScrolling";
tvar="Enabled";
text= CHATSCROLL_CONFIG_ENABLE;
tooltipText= CHATSCROLL_CONFIG_ENABLE_INFO;
type=CONTROLTYPE_CHECKBOX;
callback=function(value) ChatScroll.SetScrollEnabled(value=="1") end;
defaultValue = "1";
};
{
id="HideChatButtons";
tvar="Hide_Buttons";
text=CHATSCROLL_BUTTONS_HIDE;
tooltipText=CHATSCROLL_BUTTONS_HIDE_INFO;
type=CONTROLTYPE_CHECKBOX;
callback=function(value) ChatScroll.SetScrollButtonVisibility(value=="1") end;
defaultValue = "0";
};
};
savedVarTable = "ChatScroll_SavedVars",
loadVars = true,
};
Portfolio.RegisterOptionSet(optionSet);
end
trunk/ChatScroll/localization.fr.lua New file
0,0 → 1,20
--[[
--------------------------------------------------
File: localization.fr.lua
Addon: ChatScroll
Language: French
Translation by : Sasmira
Last Update : 4/4/2006
--------------------------------------------------
]]--
 
if ( GetLocale() == "frFR" ) then
 
-- Configuration
CHATSCROLL_CONFIG_HEADER = "Chat Scroll";
CHATSCROLL_CONFIG_HEADER_INFO = "Utiliser la m\195\180lette de la Souris pour faire d\195\169filer le chat.";
 
CHATSCROLL_CHAT_ENABLED = "D\195\169filement du chat par la m\195\180lette de la Souris activ\195\169.";
CHATSCROLL_CHAT_DISABLED = "D\195\169filement du chat par la m\195\180lette de la Souris d\195\169activ\195\169.";
 
end
trunk/ChatScroll/localization.de.lua New file
0,0 → 1,24
--[[
--------------------------------------------------
File: localization.de.lua
Addon: ChatScroll
Language: German
Translation by : StarDust
Last Update : 05/05/2006
--------------------------------------------------
]]--
 
if ( GetLocale() == "deDE" ) then
 
-- Binding Configuration
BINDING_HEADER_CHATSCROLL_HEADER = "Chat Scroll";
BINDING_NAME_CHATSCROLL_TOP = "Scroll bis ganz Oben";
 
-- Configuration
CHATSCROLL_CONFIG_HEADER = "Chat Scroll";
CHATSCROLL_CONFIG_HEADER_INFO = "Erlaubt es mit dem Mausrad den Chat nach oben und unten zu scollen.";
 
CHATSCROLL_CHAT_ENABLED = "Mausrad Chat-Scoll ist jetzt aktiviert.";
CHATSCROLL_CHAT_DISABLED = "Mausrad Chat-Scoll ist jetzt deaktiviert.";
 
end
trunk/ChatScroll/ChatScroll.toc New file
0,0 → 1,19
## Interface: 30000
## Title: ChatScroll
## Title-deDE: Chat Scroll
## Notes: Makes chat windows scrollable with the mouse wheel and has scroll button visibility options.
## Notes-deDE: Erlaubt es das Chatfenster mit dem Mausrad rauf und runter zu scrollen.
## Author: AnduinLothar
## OptionalDeps: Portfolio
## SavedVariables: ChatScroll_SavedVars
## Version: 3.0
## X-Date: Oct 14 2008
## X-Category: Chat
## X-Website: http://www.wowinterface.com/downloads/info5359-ChatScroll.html
## X-Email: karlkfi@yahoo.com
## X-Localizations: enUS, deDE, frFR
## X-CompatibleLocales: enUS, enGB, deDE, frFR
localization.en.lua
localization.de.lua
localization.fr.lua
ChatScroll.lua
trunk/ChatScroll/localization.en.lua New file
0,0 → 1,29
--[[
--------------------------------------------------
File: localization.en.lua
Addon: ChatScroll
Language: English
Translation by : AnduinLothar
Last Update : 4/4/2006
--------------------------------------------------
]]--
 
-- Binding Configuration
BINDING_HEADER_CHATSCROLL_HEADER = "Chat Scroll";
BINDING_NAME_CHATSCROLL_TOP = "Scroll To Top";
 
-- Configuration
CHATSCROLL_CONFIG_HEADER = "Chat Scroll";
CHATSCROLL_CONFIG_HEADER_INFO = "Use the mouse wheel to scroll through chat.";
 
CHATSCROLL_CONFIG_ENABLE = "Enable Chat Scroll";
CHATSCROLL_CONFIG_ENABLE_INFO = "Use the mouse wheel to scroll through chat.";
 
CHATSCROLL_CHAT_ENABLED = "Mouse wheel chat scrolling is now enabled.";
CHATSCROLL_CHAT_DISABLED = "Mouse wheel chat scrolling is now disabled.";
 
CHATSCROLL_BUTTONS_HIDE = "Hide Chat Frame Scroll Buttons";
CHATSCROLL_BUTTONS_HIDE_INFO = "Hides the four buttons on the side of each of the chat frames.";
 
CHATSCROLL_BUTTONS_HIDDEN = "Chat frame buttons are now hidden.";
CHATSCROLL_BUTTONS_SHOWN = "Chat frame buttons are now shown.";
\ No newline at end of file