pub struct InputState { /* private fields */ }Expand description
Per-frame button state with press/repeat tracking.
Implementations§
Source§impl InputState
impl InputState
Update the raw held state of a button (called on key events).
Sourcepub fn btnp(&self, b: u32) -> bool
pub fn btnp(&self, b: u32) -> bool
Was the button just pressed this frame? Repeats after a short delay
while held, matching the classic btnp feel.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputState
impl RefUnwindSafe for InputState
impl Send for InputState
impl Sync for InputState
impl Unpin for InputState
impl UnsafeUnpin for InputState
impl UnwindSafe for InputState
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