AltF02 / AltF02/mouse-rs

[feature request] lock mouse in a rectangle

未关闭
#11 0 条评论 1 个 reaction 已指派 1 人 已被 @AltF02 认领 在 GitHub 查看
enhancement
主要语言
Rust
星标
125
派生
8
PR 合并指标
30 天内没有已合并 PR

描述

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](https://docs.rs/winit/0.26.1/winit/window/struct.Window.html#method.set_cursor_grab))
and, of course, a function to unlock it as well.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。