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

Allow locking mouse position in GUI for implementing knob widgets #179

Open
jamesWalker55 opened this issue Dec 3, 2024 · 0 comments
Open

Comments

@jamesWalker55
Copy link

I noticed that there isn't a way to lock / set the mouse position in any of the GUI crates (egui, iced, etc).

When implementing a knob, it would be very useful to be able to lock the mouse position - you can just hold the mouse button down and keep moving your mouse up/down.

If you don't lock the mouse position, and the mouse reaches the edge of the screen, you cannot adjust the knob further. You have to release the mouse and move it back to the knob and start dragging it again:

Code_ScZE6TFjsF.mp4

(^ custom knob implemented in egui, no mouse locking)

In most plugin GUIs, the mouse disappears completely and you can just move the mouse as much as you want to adjust the knob. Once you release the mouse, the cursor is back where you first started:

reaper_X4P9l6JUlg.mp4

(^ knob in Molot VST)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant