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

[BUG] Overly-slow mouse scroll wheel #69

Open
tenpn opened this issue Sep 2, 2024 · 0 comments
Open

[BUG] Overly-slow mouse scroll wheel #69

tenpn opened this issue Sep 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tenpn
Copy link

tenpn commented Sep 2, 2024

Describe the bug
Scrolling the contents of a window takes many more mouse wheel rotations than expected, on my logitech G402 mouse, using the unity input system. This is consistent in builds and editor, windowed mode and full-screen.

Version/Branch of UImGui:
Version: 4.1.0

Unity Version
2023.2.13

Render pipeline (HDRP / URP / Built-in)
URP

Expected behavior
A single tick of the scroll wheel should scroll a lot more lines. Or, there should be a way to tune this on a per-project basis.

If I remove the /120 on line 79 of InputSystemPlatform.cs, I get scrolling much closer to what I expect.

In the video, you'll have to believe me that I'm furiously scrolling the mouse wheel!

Here's the code shown in the video:

        private void OnLayout(UImGui.UImGui obj)
        {
            if (ImGui.Begin("DearDebugConsole") == false)
            {
                ImGui.End();
            }

            if (ImGui.SmallButton("Test"))
            {
                
            }
            ImGui.SameLine();
            if (ImGui.SmallButton("Clear"))
            {
                
            }
            ImGui.SameLine();
            if (ImGui.SmallButton("Copy"))
            {
                
            }
            
            ImGui.Separator();

            float footerToReserve = 0;//ImGui.GetFrameHeight();
            if (ImGui.BeginChild("Logs", Vector2.down * footerToReserve))
            {
                for (int i = 0; i < 1000; ++i)
                {
                    ImGui.SetItemAllowOverlap();

                    if (ImGui.Selectable(i.ToString("000"), i == m_selectedLineIndex))
                    {
                        m_selectedLineIndex = i;
                    }
                    ImGui.SameLine();
                    ImGui.TextColored(new Vector4(1f, 1f, 0), "⚠");
                    ImGui.SameLine();
                    ImGui.TextColored(s_cols[i%s_cols.Length], "Some text!");
                }
                ImGui.EndChild();
            }
        }
spiral-slow-scrolling.mp4
@tenpn tenpn added the bug Something isn't working label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants