[][src]Struct stdweb::web::GamepadButton

pub struct GamepadButton(_);

The state of an individual button on a gamepad device.

(JavaScript docs)

Methods

impl GamepadButton[src]

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

Is the button currently pressed?

(JavaScript docs)

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

Is the button currently touched?

MDN does not document this. Firefox supports it, but Chrome (as of v65) does not.

pub fn value(&self) -> f64[src]

The amount which the button has been pressed, between 0.0 (not pressed), and 1.0 (fully pressed).

(JavaScript docs)

Trait Implementations

impl JsSerialize for GamepadButton[src]

impl TryFrom<GamepadButton> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for GamepadButton[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for GamepadButton[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for GamepadButton[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for GamepadButton[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for GamepadButton[src]

impl ReferenceType for GamepadButton[src]

impl AsRef<Reference> for GamepadButton[src]

impl From<GamepadButton> for Reference[src]

impl Clone for GamepadButton[src]

impl Eq for GamepadButton[src]

impl PartialEq<GamepadButton> for GamepadButton[src]

impl Debug for GamepadButton[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]