Skip to content

Commit c11fbfb

Browse files
committed
Add getters and setters for InputAxis and ButtonSettings (#6088)
# 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>
1 parent 964b047 commit c11fbfb

File tree

3 files changed

+621
-69
lines changed

3 files changed

+621
-69
lines changed

crates/bevy_input/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.9.0-dev" }
2222

2323
# other
2424
serde = { version = "1", features = ["derive"], optional = true }
25+
thiserror = "1.0"

0 commit comments

Comments
 (0)