-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Mouse: Add support for tracking multiple clicks more than just double #3229
Conversation
Thanks! This looks useful and will investigate/review it. |
I'll work on merging this soon. One of my aim is to also provide the data to easily detect double-click (or triple-click etc.) on the mouse-release event (rather than just down). I'm likely going to rework the user facing API but using this PR as a base. |
0c1e5bd
to
bb6a60b
Compare
…(during 1.86 WIP), replaced with GetMouseClickedCount(). (#3229)
@kudaba I have decided to rework this API (technically now breaking API but this was never in a tagged release) Removed Added Feels less arbitrary and exposing the real, general purpose data. |
A question came up on the Discord about supporting triple click line select in text boxes. This change is the first step in that direction, giving imgui the ability to detect multiple clicks in a row.
I have a follow up change that affects the text editing functionality. I'm trying to recruit some people to check how it feels on Mac/Linux unless you want to just add it to this PR.
kudaba@6ab9896
One issues I didn't address here is that by tracking with a char it will wrap after 127 consecutive clicks, but won't register as a new click until a full 256.