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

[feature request] lock mouse in a rectangle #11

Open
CaptainTux opened this issue Apr 15, 2022 · 0 comments
Open

[feature request] lock mouse in a rectangle #11

CaptainTux opened this issue Apr 15, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@CaptainTux
Copy link

CaptainTux commented Apr 15, 2022

first of all, great package, fits my use case perfectly.
it'd be awesome to be able to lock the mouse in a box (not sure if this would be outside the scope of this crate).
Say for example I have coordinates, width and height.
I want to lock the mouse in that rectangle.
For example calling a function like fn lock_mouse(x: i32, y: i32, width: i32, height: i32) would lock the mouse in that rectangle.
kind of an equivalent to winit's set_cursor_grab (see here)
and, of course, a function to unlock it as well.

@AltF02 AltF02 self-assigned this Apr 15, 2022
@AltF02 AltF02 added the enhancement New feature or request label Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants