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

Remove the hacky `value` field and `from_value` method of axis-like inputs in favor of a new input mocking API #515

Closed Shute052 closed 2 months ago

Shute052 commented 2 months ago

Migration Guide

If you were using the send_input method for buttons and keys to send simulated pressed events, simply update the method name to press_input.

If you were using the value field or the from_value method to create a SingleAxis or DualAxis instance for sending simulated input events, you can remove them entirely. Simply use a normal version of these inputs and call the send_axis_values method with your desired values.

alice-i-cecile commented 2 months ago

Oh thank goodness I hated that design!

alice-i-cecile commented 2 months ago

Broadly in favor of the refactor: I like how this looks, and the split is cleaner. The diff is quite messy still: can you rebase?