pub struct NullInputProvider { /* private fields */ }Expand description
An input provider that does nothing. Used for headless testing and as a default when no input system is available.
Implementations§
Trait Implementations§
Source§impl Default for NullInputProvider
impl Default for NullInputProvider
Source§impl InputProvider for NullInputProvider
impl InputProvider for NullInputProvider
Source§fn input_capabilities(&self) -> &InputCapabilities
fn input_capabilities(&self) -> &InputCapabilities
Returns the typed input capabilities for this provider.
Source§fn update_input(&mut self) -> GoudResult<()>
fn update_input(&mut self) -> GoudResult<()>
Per-frame input update. Processes queued events and updates state.
Source§fn key_pressed(&self, _key: KeyCode) -> bool
fn key_pressed(&self, _key: KeyCode) -> bool
Returns true if the key is currently held down.
Source§fn key_just_pressed(&self, _key: KeyCode) -> bool
fn key_just_pressed(&self, _key: KeyCode) -> bool
Returns true if the key was pressed this frame (not held from previous).
Source§fn key_just_released(&self, _key: KeyCode) -> bool
fn key_just_released(&self, _key: KeyCode) -> bool
Returns true if the key was released this frame.
Source§fn mouse_position(&self) -> [f32; 2]
fn mouse_position(&self) -> [f32; 2]
Returns the current mouse position as [x, y] in window coordinates.
Source§fn mouse_delta(&self) -> [f32; 2]
fn mouse_delta(&self) -> [f32; 2]
Returns the mouse movement delta since the last frame as [dx, dy].
Returns true if the mouse button is currently held down.
Source§fn scroll_delta(&self) -> [f32; 2]
fn scroll_delta(&self) -> [f32; 2]
Returns the scroll wheel delta since the last frame as [dx, dy].
Source§fn gamepad_connected(&self, _id: GamepadId) -> bool
fn gamepad_connected(&self, _id: GamepadId) -> bool
Returns true if a gamepad with the given ID is connected.
Source§fn gamepad_axis(&self, _id: GamepadId, _axis: GamepadAxis) -> f32
fn gamepad_axis(&self, _id: GamepadId, _axis: GamepadAxis) -> f32
Returns the value of a gamepad axis (-1.0 to 1.0).
Returns true if a gamepad button is currently held down.
Source§impl Provider for NullInputProvider
impl Provider for NullInputProvider
Auto Trait Implementations§
impl Freeze for NullInputProvider
impl RefUnwindSafe for NullInputProvider
impl Send for NullInputProvider
impl Sync for NullInputProvider
impl Unpin for NullInputProvider
impl UnsafeUnpin for NullInputProvider
impl UnwindSafe for NullInputProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().