Leafwing-Studios / leafwing-input-manager

A straightforward stateful input manager for the Bevy game engine.
Apache License 2.0
616 stars 92 forks source link

Refactor `UserInput` into `Buttonlike`, `Axislike` and `DualAxislike` #548

Open alice-i-cecile opened 1 week ago

alice-i-cecile commented 1 week ago

Fixes #535.

This is a major refactor that splits user inputs into three kinds: buttonlike, axislike and dualaxislike. This change ends up rippling through the whole stack: from Actionlike to UserInput to InputMap to ActionState.

Despite that, I'm really happy with this change! It really clarifies the semantics of the different input types, in a way that I think will be easier to learn, more natural to maintain and harder to mess up.

There are a number of items that need to be done before this is mergeable still: