generated from Leafwing-Studios/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…#548) * Initial trait split * Migrate simple forms of user input * First try for moving over chords * Fix ModifierKey::with * Fix missing import * Rename InputMap::map * Split apart fancy reflection and serde code * Add more reflect and serde impls for split traits * Simple compile error * Don't bother updating ActionData with axislike values * Migrate input mocking to new API * Add more serde trait registries * Missing import * Rename InputChord to ButtonlikeChord * Add chords for axislike types * Clarify InputMap docs for [`Buttonlike`] limitations * Clear actions regardless of their binding * Add Actionlike::input_control_kind * Add InputMap::insert_axis and friends * Validate InputControlKind in InputMap construction * Remove complex and unhelpful test * Fix test * Migrate and simplify user input tests * More input test cleanup * Fix UserInput::decompose for fancy chords * Try to parse the fields to determine correct input kind * Revert "Try to parse the fields to determine correct input kind" This reverts commit 91bf83b. * Just manually implement Actionlike for non-trivial cases * Update release notes * Move InputControlKind to crate root * Add InputControlKind to the prelude * Make tests and examples compile * ActionData -> ButtonData * Add AxisDatum and DualAxisDatum * DualAxisData yeet * Yeet silly Datum naming * Unused imports * Remove value and axis_pair fields from ButtonData * Newtype the InputMap -> ActionData interchange * with_dualaxis -> with_dual_axis * Fix logic for ActionDiff::apply_diff * `ActionDiff::ValueChanged` is now `ActionDiff::AxisChanged` * Start refactoring ActionDiff * Finish rewriting action diffing * Improve docs for BasicInputs * Improve clashing input docs * Split apart methods on `InputMap` * Fix incorrect link * Progress towards making examples and benchmarks compile * Stub out `InputMap::process_actions` * Use simple data in UpdatedActions struct * Trivial fixes * Actual update the action values based on the input map * Make ActionState::axis_pair non-optional * Make tests and examples compile * Cargo fmt * Clippy autofix * Cargo fmt * Fix broken doc links * Split apart action data for code organization * Clarify code for ActionState::pressed and friends * Fix default behavior of ActionState buttons * More doc links * Add tests for the length of input types * Refactor BasicInputs to be much simpler * Add ButtonlikeChord::modified * Fix length computation for buttonlike chords * Make clash detection test more useful * Improve clashing inputs logic slightly * Revert "Refactor BasicInputs to be much simpler" This reverts commit 70fe3fb. * BasicInputs::Group -> BasicInputs::Chord * Better docs for BasicInputs::len * Store Buttonlikes in `BasicInputs` * Clean up docs * Add more debugging to dpad + chord clash test * InputMap::get -> InputMap::get_buttonlike * Upgrade warnings to errors for wrong input kind * More debugging for tests and debug_assert for misconfigured Actionlike * Add InputMap::decomposed * Add UserInputWrapper and UserInput::get * Add debug asserts to UserInputWrapper::kind * Ignore failing tests for now * Fix doc tests * Clean up migration guide * Cargo fmt * Disable ActionDiff tests * Remove test checking that an axis is pressed * Remove meaningless assertions that axes are released * Remove assertions that axes are pressed * Remove asserrtions calling .value on a dual_axis action * Add debug asserts for UserInputKind to ActionState * Stop calling .value on DualAxis actions in tests * Fix Actionlike impl for AxislikeTestAction * Clean up mouse integration tests in the same ways * Remove nonsensical test
- Loading branch information
1 parent
1b75a86
commit 5e90a7d
Showing
39 changed files
with
3,992 additions
and
2,924 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.