refactor key scans and add gamepad button/axes scans - #46
Conversation
|
@quasilyte what are your thoughts on this refactored approach to key scanning? I'm also hoping to later add ability to scan for mouse buttons, maybe even gamepad axes. |
|
I do like the idea to make it better! I only had a limited use of it to implement the in-game key rebinding. The lack of the mouse scanning, for instance, was noticeable even there. |
4126186 to
92915c2
Compare
e2ecb2d to
99b5e10
Compare
…me it was just set
|
Ping me when it's ready for review/merge. |
09de3ae to
ae4ef29
Compare
- only JustPressedActionInfo previously handled mouse wheel events
2004fbc to
c453aac
Compare
- also had to swap wheel up/down determination since it was reporting the reverse when remapped
|
I've gotten mouse wheel working as well, next up is figuring out mouse axes since this does not appear to be a "Key" managed by ebitengine-input at the moment like other axes such as gamepad sticks. |
5f1a614 to
2e4f763
Compare
|
@quasilyte I think it's in a good place now, I also went ahead and added mouse move as a "key" that can be bound to an action and scanned for remapping :) |
|
I went back and improved the example after trying to translate it to how my game uses scanning and finding it needed to be made clearer on toggling the different scan types independently. |
|
Back to draft, found an issue where my game using ebitenui is not picking up mouse axes events like the example was, so need to figure that out first. |
|
Figured it out, it was a problem in my game input system setup where I was de-referencing pointers somewhere I shouldn't have and it caused the Handler's System.cursorPos to not be updated on the correct reference: pixelmek-3d/pixelmek-3d@ed47c6c |
- temporarily using go mod replace until PR is accepted: quasilyte/ebitengine-input#46
- separating out the mouse motion code to focus this PR on adding gamepad and axis scanning capability
4bbaafe to
52b594b
Compare
_examples/remap.