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

dragging viewport with left mouse button #88

Closed
AartOdding opened this issue Oct 15, 2020 · 2 comments
Closed

dragging viewport with left mouse button #88

AartOdding opened this issue Oct 15, 2020 · 2 comments

Comments

@AartOdding
Copy link
Contributor

hey there,

I'm using this library for my project and i really like it! One feature which i would love to have is being able to configure which mouse buttons trigger what interactions, maybe put lasso select on right mouse button and moving the viewport on left, or moving the viewport with the middle mouse button etc. Do you think it would be hard to implement? I'd also be willing to spend some time on this, if you'd be willing to accept any pull requests. What do you think?

@thedmd
Copy link
Owner

thedmd commented Dec 4, 2020

Mouse buttons are hardcoded now. Mostly in various actions, but they can be changed to be configurable. It is not hard to do.

thedmd added a commit that referenced this issue Dec 25, 2020
        New API in Config:
            int                     DragButtonIndex;        // Mouse button index drag action will react to (0-left, 1-right, 2-middle)
            int                     SelectButtonIndex;      // Mouse button index select action will react to (0-left, 1-right, 2-middle)
            int                     NavigateButtonIndex;    // Mouse button index navigate action will react to (0-left, 1-right, 2-middle)
            int                     ContextMenuButtonIndex; // Mouse button index context menu action will react to (0-left, 1-right, 2-middle)
@thedmd
Copy link
Owner

thedmd commented Dec 25, 2020

It is done, you can now override mouse button indices used in actions via Config:

            int                     DragButtonIndex;        // Mouse button index drag action will react to (0-left, 1-right, 2-middle)
            int                     SelectButtonIndex;      // Mouse button index select action will react to (0-left, 1-right, 2-middle)
            int                     NavigateButtonIndex;    // Mouse button index navigate action will react to (0-left, 1-right, 2-middle)
            int                     ContextMenuButtonIndex; // Mouse button index context menu action will react to (0-left, 1-right, 2-middle)

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

No branches or pull requests

2 participants