Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MouseOver/Scrollwheel Chat Tabs to cycle though tabs #223

Open
orionshock opened this issue Jan 5, 2025 · 0 comments
Open

MouseOver/Scrollwheel Chat Tabs to cycle though tabs #223

orionshock opened this issue Jan 5, 2025 · 0 comments
Labels
classic Affects Prat on Wrath classic enhancement New feature or request

Comments

@orionshock
Copy link

Describe the solution you'd like
When hovering over the chat tabs and using scroll wheel for the tabs to cycle left and right.

Describe alternatives you've considered
I made an addon stub that does this

Additional context

for i = 1, 10 do
    local tab = _G["ChatFrame" .. i .. "Tab"]
    if tab then
        tab:SetScript(
            "OnMouseWheel",
            function(chatFrameTabButton, wheelDirection)
                local chatFrame = _G["ChatFrame" .. chatFrameTabButton:GetID()]
                if chatFrame and FCFDock_HasDockedChatFrame(GeneralDockManager, chatFrame) then
                    local selectedFrame = FCFDock_GetSelectedWindow(GeneralDockManager)
                    local dockedFrameList = FCFDock_GetChatFrames(GeneralDockManager)
                    for index, inspectFrame in ipairs(dockedFrameList) do
                        if selectedFrame == inspectFrame then
                            local nextIndex = index + wheelDirection
                            local nextFrame = dockedFrameList[nextIndex]
                            if nextFrame then
                                FCFDock_SelectWindow(GeneralDockManager, nextFrame)
                                nextFrame:ScrollToBottom()
                            end
                            break
                        end
                    end
                end
            end
        )
    end
end

Free to use :)

@orionshock orionshock added classic Affects Prat on Wrath classic enhancement New feature or request labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
classic Affects Prat on Wrath classic enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant