-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Basic Smooth Scrolling Example #8391
Comments
You calling The other problem is to test whether this would work with mouse/drivers that are already submitting smooth scrolling value as inputs. |
With a quick test with my trackpad: scrolling works as expected but double tap ( |
That makes a lot of sense actually, and aligns with what Omar mentioned. Then yeah what I proposed is definitely flawed in that state, I just never noticed as I don't have anything using double clicks in my apps using imgui. I suppose the other approach of not passing the events to the imgui SDL3 backend and processing downstream before NewFrame() would work fine then, I will update the post. Thank you both for the feedback! |
Updated the snippet, no longer uses the internal |
Working quite well! |
Version/Branch of Dear ImGui:
Version 1.91.8, Branch: master
Back-ends:
imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Linux + Clang 19.1.7
Details:
I found a workaround for smooth scrolling without modifying ImGui code, so I thought I'd share it here for anyone looking for a way to do this. It's a very simple and dumb way to do it, I am not proposing this be added to ImGui itself of course, but it works well enough for my needs so maybe others will find it useful too.
Screenshots/Video:
2025-02-12-04.50.06.148490094.mp4
Minimal, Complete and Verifiable Example code:
Parts marked as
// ...
indicate sections of code that aren't relevant to the logic of this workaround, you can refer to the complete ImGui backends examples and slot in this code where relevant.Note that:
The text was updated successfully, but these errors were encountered: