Simplify mouse button tracking
delete the shitcodes
This commit is contained in:
1 parent
285a6d080b
commit
81d3c990bf
3 files changed
+55
-64
No files matched your search
@@ -13,7 +13,7 @@ fn app(cx: Scope) -> Element {
|
||||
}
|
||||
|
||||
fn get_brightness(m: Arc<MouseData>) -> i32 {
|
||||
let b: i32 = m.buttons.count_ones().try_into().unwrap();
|
||||
let b: i32 = m.held_buttons().len().try_into().unwrap();
|
||||
127 * b
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user