pub trait QueryInput {
// Required methods
fn pressed(&self, input: impl Into<UserInput>) -> bool;
fn pressed_for_gamepad(
&self,
input: impl Into<UserInput>,
gamepad: Option<Gamepad>
) -> bool;
}Expand description
Query [ButtonInput] state directly for testing purposes.
In game code, you should (almost) always be using ActionState
methods instead.
Required Methods§
Object Safety§
This trait is not object safe.