Skip to content

Instantly share code, notes, and snippets.

@tekkub
Created August 25, 2008 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tekkub/7014 to your computer and use it in GitHub Desktop.
Save tekkub/7014 to your computer and use it in GitHub Desktop.
local function scroller(frame, delta)
if delta > 0 then
if IsShiftKeyDown() then frame:ScrollToTop()
else frame:ScrollUp() end
elseif delta < 0 then
if IsShiftKeyDown() then frame:ScrollToBottom()
else frame:ScrollDown() end
end
end
for i=1,NUM_CHAT_WINDOWS do
local cf = _G["ChatFrame"..i]
cf:EnableMouseWheel(true)
cf:SetScript("OnMouseWheel", scroller)
end
local eb = ChatFrameEditBox
eb:ClearAllPoints()
eb:SetPoint("TOPLEFT", ChatFrame1, "TOPLEFT", -5, 4)
eb:SetPoint("TOPRIGHT", ChatFrame1, "TOPRIGHT", 5, 4)
eb:SetAltArrowKeyMode(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment