renamed MockInput::send_input method to MockInput::press_input to better reflect its current functionality for clarity.
removed the hacky value field and from_value method from SingleAxis and DualAxis, in favor of new input mocking API.
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.
fn send_axis_values(&self, input: UserInput, values: impl IntoIterator<Item = f32>)
.fn send_axis_values_as_gamepad(&self, input: UserInput, values: impl IntoIterator<Item = f32>, gamepad: Option<Gamepad>)
.MockInput::send_input
method toMockInput::press_input
to better reflect its current functionality for clarity.value
field andfrom_value
method fromSingleAxis
andDualAxis
, in favor of new input mocking API.Migration Guide
If you were using the
send_input
method for buttons and keys to send simulated pressed events, simply update the method name topress_input
.If you were using the
value
field or thefrom_value
method to create aSingleAxis
orDualAxis
instance for sending simulated input events, you can remove them entirely. Simply use a normal version of these inputs and call thesend_axis_values
method with your desired values.