Skip to content

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

Open
@jamesWalker55

Description

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)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions