pub struct ButtonAction {
pub state: ButtonState,
pub just_pressed: bool,
pub just_released: bool,
}Expand description
Button action with edge-detection flags.
just_pressed and just_released are true only on the tick the transition
occurred. They are cleared by ActionMap::begin_tick (and may also be
cleared earlier by the consumer via ActionMap::action_mut).
Fields§
§state: ButtonStateCurrent button state.
just_pressed: boolTrue on the tick the button went down.
just_released: boolTrue on the tick the button came up.
Trait Implementations§
Source§impl Clone for ButtonAction
impl Clone for ButtonAction
Source§impl Debug for ButtonAction
impl Debug for ButtonAction
Auto Trait Implementations§
impl Freeze for ButtonAction
impl RefUnwindSafe for ButtonAction
impl Send for ButtonAction
impl Sync for ButtonAction
impl Unpin for ButtonAction
impl UnsafeUnpin for ButtonAction
impl UnwindSafe for ButtonAction
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