Commit 9b36ff4
Mouse bindings (#379)
* Mouse bindings
* Allow mid click bindings and use button name numbers instead of index
Human-readable mouse names start with 1. Using this scheme aligns with what you'd see in RusherHack for example. To accomplish this, any raw mouse input that comes as an index we simply increment by 1.
I'm planning on PR'ing a hud module that shows all bindings, again like in Rusherhack. So this would trigger my OCD having those bind names not align between clients.
* fix comment and comparisons for clarity
* clarify what min index means
* Cleanup and cast safety
* More null safety (!! can throw an exception)
also mousekey is concurrent and may change after first null check.
Co-authored-by: Constructor <fractalminds@protonmail.com>1 parent 3dcbc8a commit 9b36ff4
File tree
6 files changed
+67
-19
lines changed- src/main/kotlin/com/lambda/client
- event
- gui/rgui/component
- module
- setting/settings/impl/other
- util
6 files changed
+67
-19
lines changedLines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | | - | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
62 | 71 | | |
63 | 72 | | |
64 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
65 | 83 | | |
66 | 84 | | |
67 | 85 | | |
68 | 86 | | |
69 | 87 | | |
| 88 | + | |
70 | 89 | | |
71 | 90 | | |
72 | 91 | | |
| |||
75 | 94 | | |
76 | 95 | | |
77 | 96 | | |
| 97 | + | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
| |||
88 | 108 | | |
89 | 109 | | |
90 | 110 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
95 | 120 | | |
96 | | - | |
| 121 | + | |
97 | 122 | | |
98 | 123 | | |
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
102 | 127 | | |
| 128 | + | |
| 129 | + | |
103 | 130 | | |
104 | 131 | | |
105 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments