Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start 0.3 process * Swap back to a by-value API * Primitives for working with Axislike inputs * Split primitives into a dedicated file * Improve conversion strategy for primitives * Direction partitionings * Algebraic operations for Rotation * Fixed broken tests * InputAxis -> AxisPair * AxisPair::new() * Swap to usize-based hashing to support value-ful actions * Noted addition of geometric rotation primitives * Simplify set_state logic * Correctly initialize ActionState again * Fix PartialOrd trait for Timing * Store and set action values * Use Vec storage internally Fixes Leafwing-Studios#69. * Experimentation with action value API * Revert "Experimentation with action value API" This reverts commit 76b9d15. * Don't store action values * Run examples in CI Borrowed from https://github.com/bevyengine/bevy/blob/main/.github/workflows/ci.yml * Remove bevy-specific logic in examples CI * Don't try to run examples; way too hard * Use underscores for crate name * mdlint rules * Move geometric primitives into leafwing_2d * Remove dead code in macro * Underscores in crate name * Local development * Relative path for macros crate * Fix outdated example * Fix underscores in crate name * Polish README * Fix broken doc links * Simplify CI: no reason to try to run on all platforms * Refactor `which_pressed` to return a `Vec<VirtualButtonState>` This is not only cleaner than returning a `HashSet` of indicies, but also opens up the way to add `UserInput` information * Update `get_clashes` to use a slice instead of a full `Vec` Clippy recommended this for _performance purposes_ * Run `cargo fmt` Oops * Add API method to return which `UserInput` triggered an action * Move bevy_ui dependency under a feature * Vendor leafwing_2d orientation code Should not block a release * replace_at and clear_at can be used in a device-agnostic way * Use usize for container sizes * Fix missing dependencies * Remove per_mode_cap * Simplify InputMap API * Fix docs formatting * Remove extra pub specifier * Remove UserInput::Null * Remove empty_chords test Doesn't make sense after `UserInput::Null` removal. * Update RELEASES.md * Add missing change to RELEASES.md * Add methods to conveniently iterate over mappings * Use type alias * Add InputMap::remove * Store ClashStrategy in a resource * Remove clashing input caching * Enable default for serde * Fix formatting * Changed `ActionState.button_states` inserts into direct assignments * Added helper function for setting `action` as "held" * Iterate over actions with mapping by default In previous PR I added a method to iterate over inputs. But I realized that such iteration should be with action like in normal map. So I renamed the submitted `iter()` method into `iter_inputs()` and added `iter()` that iterates over actions with inputs. I also have to delete `IntoIter` currently because we can't use opaque type in traits without nightly compiler. If you know how to implement it properly - I would appreciate your advice. But for now I removed it. * Add binding_menu example * Fix tests (Leafwing-Studios#99) * Fix which_pressed test * Remove references to leafwing_2d * Fix failing doc tests * Depend on bevy subcrates (Leafwing-Studios#100) * Fix doc strings * Use bevy subcrates for faster compiles and easier feature creation * Replace run_in_state with DisableInput resource (Leafwing-Studios#106) * Replace run_in_state with DisableInput resource * Update release notes * Fix formatting * Improve system label description * Apply suggestions * Systems refactor (Leafwing-Studios#107) * Refactor plugin systems logic Insert systems right away instead of putting them into input_manager_systems system set. * Rename `InputManagerSystem::Reset` into `InputManagerSystem::Tick` * Chain add_system_to_stage calls * Allow use of InputMap and ActionState as resources * Adding InputResource and supporting system modifications * Second Attempt * Cleaning up formatting. * Adding RELEASES.md notice. * Update RELEASES.md New working as provided by alice-i-cecile Co-authored-by: Alice Cecile <[email protected]> * Addressing Shatur's naming Concerns. * Adding lint exception * adding clippy:: to too_many_arguments Co-authored-by: Alice Cecile <[email protected]> * Naming nits for systems (Leafwing-Studios#111) * Tests and refactoring for reasons pressed (Leafwing-Studios#110) * Move VirtualButtonState and Timing into a more appropriate location * Use named fields in VirtualButtonState * Removed poorly motivated ButtonThresholds struct * reasons_pressed methods * press and release methods on VirtualButtonState * VirtualButtonState::tick * Doc tests for reasons_pressed * Shorten module names * Refactor UserInput into its own file * Fix timing test * Fix broken doc tests * ActionState::reset API (Leafwing-Studios#112) * ActionState::make_held -> ActionState::reset * Fix rename in doc test * Fixed misleading merge conflict in RELEASES * Clean up release notes * Fix import in doc tests * More release note polish... * Fix doc test * Added example demonstrating how to use reset in system * Refactor VirtualButtonState (Leafwing-Studios#113) * Rename VirtualButtonState to ButtonState * Radically simplify ButtonState * Re-add reasons_pressed functionality * Fetch ActionData, not ButtonState * Re-add Timing functionality * Consolidate tests * Updated release notes * Assorted cleanup * Fix tests * Provide functionality to release inputs during mocking (Leafwing-Studios#114) * Note that mocked inputs will not be automatically released * Add input releasing to input mocking tools * Add UserInput::raw_inputs * Add ActionState::freeze (Leafwing-Studios#115) * ActionState::freeze and ActionState::unfreeze * Yeet DisableInput resource * Fix stray doc test (Leafwing-Studios#116) * Replace freeze API with improved DisableInput resource (Leafwing-Studios#117) * Replace freeze API with DisableInput improved resource ActionState::freeze was introduced to consume actions. But it turns out not very ergonomic. Also freeze require to spawn an entity or init the resource should which is not always the case. In this iteration I used run criteria to make the code nicer. Also I extended disable_input test to check if global and entity input is released on disable. * Use field to control if actions are enabled * Update RELEASES.md * Add ActionState::consume (Leafwing-Studios#118) * Update to Bevy 0.7 (Leafwing-Studios#119) * Bump dependencies * New ergonomics! * Fix typo * Bump bevy_egui dev-dependency * Finalize release notes (Leafwing-Studios#120) Co-authored-by: Rose Peck <[email protected]> Co-authored-by: Hennadii Chernyshchyk <[email protected]> Co-authored-by: Elfein Landers <[email protected]> Co-authored-by: Hans W. Uhlig <[email protected]>
- Loading branch information