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

Add Inversion to SingleAxis, DualAxis, and VirtualDPad #362

Merged
merged 6 commits into from
Jul 2, 2023

Conversation

SignalWalker
Copy link
Contributor

@SignalWalker SignalWalker commented Jun 30, 2023

Fixes #247.

Adds inverted, inverted_x, and inverted_y builder-style functions for SingleAxis, DualAxis, and VirtualDPad, where appropriate. The SingleAxis implementation uses an inverted field, the DualAxis implementation just inverts its internal axes, and the VirtualDPad implementation swaps the relevant inputs.

Current tests pass, but I haven't written any yet to test inversion.

Todo

  • Write tests
  • Better documentation?

@alice-i-cecile alice-i-cecile added enhancement New feature or request breaking-change A breaking change that requires a new major version labels Jun 30, 2023
src/axislike.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid :) Changelog entry and a couple tests and this looks good to me.

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
@SignalWalker
Copy link
Contributor Author

Solid :) Changelog entry and a couple tests and this looks good to me.

Cool, thanks. CONTRIBUTING.md says to put changes into CHANGELOG.md, which doesn't exist -- I assume it should be RELEASES.md?

@alice-i-cecile
Copy link
Contributor

That's correct. Thanks for pointing that out; I'll update it!

@alice-i-cecile alice-i-cecile enabled auto-merge (squash) July 2, 2023 16:43
@alice-i-cecile alice-i-cecile merged commit 76076be into Leafwing-Studios:main Jul 2, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A breaking change that requires a new major version enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding inversion to mouse and gamepad axes
2 participants