pub struct InputView<'a> { /* private fields */ }Expand description
Read-only gameplay input with game-chosen action and pointer-motion masks.
Implementations§
Source§impl<'a> InputView<'a>
impl<'a> InputView<'a>
Sourcepub fn with_blocked_axes(self, blocked: &'a [Axis]) -> Self
pub fn with_blocked_axes(self, blocked: &'a [Axis]) -> Self
Adds explicit analog masks to this gameplay view. Masked values are neutral; raw input stays readable by UI and held values resume unmasked.
Sourcepub fn axis(&self, negative: Action, positive: Action) -> f32
pub fn axis(&self, negative: Action, positive: Action) -> f32
Digital axis with masked actions contributing zero.
Sourcepub fn pointer_delta(&self) -> Vec2
pub fn pointer_delta(&self) -> Vec2
Relative look motion, or zero while the UI owns it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for InputView<'a>
impl<'a> RefUnwindSafe for InputView<'a>
impl<'a> Send for InputView<'a>
impl<'a> Sync for InputView<'a>
impl<'a> Unpin for InputView<'a>
impl<'a> UnsafeUnpin for InputView<'a>
impl<'a> UnwindSafe for InputView<'a>
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