-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Add getters and setters for InputAxis
and ButtonSettings
#6088
Conversation
positive_high => livezone_upperbound positive_low => deadzone_upperbound negative_low => deadzone_lowerbound negative_high => livezone_lowerbound
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small doc suggestions.
Co-authored-by: Afonso Lage <lage.afonso@gmail.com>
Co-authored-by: Afonso Lage <lage.afonso@gmail.com>
An attempt to comply with Rust API Guidelines.
I've taken a look at the docs, and I'm quite happy with how they are :) |
Co-authored-by: François <mockersf@gmail.com>
Other minor fixes to threshold docs.
Split `GamepadSettingsError` error into two enums, `ButtonSettingsError` and `AxisSettingsError`.
Added more tests. Fixed docstrings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Truly, the most industrial grade input config code I've ever seen. You have my approval :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made. Docs have changed.
@afonsolage Any doc changes you'd like to make? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for including the tests!
Merging! bors r+ |
# Objective Fixes #3418 ## Solution Originally a rebase of #3446. Work was originally done by mfdorst, who should receive considerable credit. Then the error types were extensively reworked by targrub. ## Migration Guide `AxisSettings` now has a `new()`, which may return an `AxisSettingsError`. `AxisSettings` fields made private; now must be accessed through getters and setters. There's a dead zone, from `.deadzone_upperbound()` to `.deadzone_lowerbound()`, and a live zone, from `.deadzone_upperbound()` to `.livezone_upperbound()` and from `.deadzone_lowerbound()` to `.livezone_lowerbound()`. `AxisSettings` setters no longer panic. `ButtonSettings` fields made private; now must be accessed through getters and setters. `ButtonSettings` now has a `new()`, which may return a `ButtonSettingsError`. Co-authored-by: targrub <62773321+targrub@users.noreply.github.com>
Pull request successfully merged into main. Build succeeded: |
InputAxis
and ButtonSettings
InputAxis
and ButtonSettings
…ine#6088) # Objective Fixes bevyengine#3418 ## Solution Originally a rebase of bevyengine#3446. Work was originally done by mfdorst, who should receive considerable credit. Then the error types were extensively reworked by targrub. ## Migration Guide `AxisSettings` now has a `new()`, which may return an `AxisSettingsError`. `AxisSettings` fields made private; now must be accessed through getters and setters. There's a dead zone, from `.deadzone_upperbound()` to `.deadzone_lowerbound()`, and a live zone, from `.deadzone_upperbound()` to `.livezone_upperbound()` and from `.deadzone_lowerbound()` to `.livezone_lowerbound()`. `AxisSettings` setters no longer panic. `ButtonSettings` fields made private; now must be accessed through getters and setters. `ButtonSettings` now has a `new()`, which may return a `ButtonSettingsError`. Co-authored-by: targrub <62773321+targrub@users.noreply.github.com>
…ine#6088) # Objective Fixes bevyengine#3418 ## Solution Originally a rebase of bevyengine#3446. Work was originally done by mfdorst, who should receive considerable credit. Then the error types were extensively reworked by targrub. ## Migration Guide `AxisSettings` now has a `new()`, which may return an `AxisSettingsError`. `AxisSettings` fields made private; now must be accessed through getters and setters. There's a dead zone, from `.deadzone_upperbound()` to `.deadzone_lowerbound()`, and a live zone, from `.deadzone_upperbound()` to `.livezone_upperbound()` and from `.deadzone_lowerbound()` to `.livezone_lowerbound()`. `AxisSettings` setters no longer panic. `ButtonSettings` fields made private; now must be accessed through getters and setters. `ButtonSettings` now has a `new()`, which may return a `ButtonSettingsError`. Co-authored-by: targrub <62773321+targrub@users.noreply.github.com>
…ine#6088) # Objective Fixes bevyengine#3418 ## Solution Originally a rebase of bevyengine#3446. Work was originally done by mfdorst, who should receive considerable credit. Then the error types were extensively reworked by targrub. ## Migration Guide `AxisSettings` now has a `new()`, which may return an `AxisSettingsError`. `AxisSettings` fields made private; now must be accessed through getters and setters. There's a dead zone, from `.deadzone_upperbound()` to `.deadzone_lowerbound()`, and a live zone, from `.deadzone_upperbound()` to `.livezone_upperbound()` and from `.deadzone_lowerbound()` to `.livezone_lowerbound()`. `AxisSettings` setters no longer panic. `ButtonSettings` fields made private; now must be accessed through getters and setters. `ButtonSettings` now has a `new()`, which may return a `ButtonSettingsError`. Co-authored-by: targrub <62773321+targrub@users.noreply.github.com>
…ine#6088) # Objective Fixes bevyengine#3418 ## Solution Originally a rebase of bevyengine#3446. Work was originally done by mfdorst, who should receive considerable credit. Then the error types were extensively reworked by targrub. ## Migration Guide `AxisSettings` now has a `new()`, which may return an `AxisSettingsError`. `AxisSettings` fields made private; now must be accessed through getters and setters. There's a dead zone, from `.deadzone_upperbound()` to `.deadzone_lowerbound()`, and a live zone, from `.deadzone_upperbound()` to `.livezone_upperbound()` and from `.deadzone_lowerbound()` to `.livezone_lowerbound()`. `AxisSettings` setters no longer panic. `ButtonSettings` fields made private; now must be accessed through getters and setters. `ButtonSettings` now has a `new()`, which may return a `ButtonSettingsError`. Co-authored-by: targrub <62773321+targrub@users.noreply.github.com>
Objective
Fixes #3418
Solution
Originally a rebase of #3446. Work was originally done by mfdorst, who should receive considerable credit. Then the error types were extensively reworked by targrub.
Migration Guide
AxisSettings
now has anew()
, which may return anAxisSettingsError
.AxisSettings
fields made private; now must be accessed through getters and setters. There's a dead zone, from.deadzone_upperbound()
to.deadzone_lowerbound()
, and a live zone, from.deadzone_upperbound()
to.livezone_upperbound()
and from.deadzone_lowerbound()
to.livezone_lowerbound()
.AxisSettings
setters no longer panic.ButtonSettings
fields made private; now must be accessed through getters and setters.ButtonSettings
now has anew()
, which may return aButtonSettingsError
.