[][src]Enum quicksilver::input::ButtonState

#[repr(u8)]
pub enum ButtonState {
    Pressed,
    Held,
    Released,
    NotPressed,
}

The current state of a button

Variants

Pressed

The button was activated this frame

Held

The button is active but was not activated this frame

Released

The button was released this frame

NotPressed

The button is not active but was not released this frame

Methods

impl ButtonState[src]

pub fn is_down(&self) -> bool[src]

Determine if the button is either Pressed or Held

#[must_use] pub fn clear_temporary(&self) -> ButtonState[src]

Convert the button from a temporary state to a permanent state

Pressed states become Held, Released states become NotPressed

Trait Implementations

impl Clone for ButtonState[src]

impl Copy for ButtonState[src]

impl Eq for ButtonState[src]

impl PartialEq<ButtonState> for ButtonState[src]

impl Debug for ButtonState[src]

impl Hash for ButtonState[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> CollisionObjectHandle for T where
    T: 'static + Send + Copy + Sync + PartialEq<T> + Eq + Hash
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Slottable for T where
    T: Copy
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]