-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Horizontal mouse wheel support #1463
Horizontal mouse wheel support #1463
Conversation
This patch adds support for the horizontal mouse wheel in ImGui. It affects windows that can be scrolled, as long as the Ctrl key is not being pressed. The scrolling speed has been set empirically so that it matches the scrolling speed on the Firefox browser when the horizontal wheel is used. Internally, it adds a MouseHorizWheel to ImGuiIO, which is then used in NewFrame to scroll the current window. The SDL/GL2, SDL/GL3, GLFW/GL2 and GLFW/GL3 examples has been modified to use it.
Regarding examples I didn't modify for various reasons:
|
Thanks Emmanuel for this PR and all the precision! Looking good :) |
@tseeker I am working on this now. Any reason why for the speed you used Would you say that using |
… Reorganized the code in NewFrame(). Examples: Updated GLFW+GL and SDL+GL accordingly. (#1463)
…for horizontal mouse wheel. (#1463)
I merged this with some renaming/tweaks/simplifications of the example code. The field is called It's not well tested and don't know what a proper scrolling is either, I used FontSize to be consistent with the vertical wheel, so I'm thinking maybe the base scale factor should be used specified. |
Sorry for the late reply. |
…tAllowUserScaling feature (probably should be made obsolete, but until then best fixed)
…wheel / touch pads (#3394, #2424, #1463) [@nobody-special666] Amend 7dea158 + Fix vsproj GUID
…iding by 100.0f on Emscripten. (#4019, #6096, #1463) Ref libsdl-org/SDL#10454 (comment)
This patch adds support for the horizontal mouse wheel in ImGui. It affects windows that can be scrolled, as long as the Ctrl key is not being pressed.
The scrolling speed has been set empirically so that it matches the scrolling speed on the Firefox browser when the horizontal wheel is used.
Internally, it adds a MouseHorizWheel to ImGuiIO, which is then used in NewFrame to scroll the current window. This field should be set by the backend.
The SDL/GL2, SDL/GL3, GLFW/GL2 and GLFW/GL3 examples have been modified to use it.