Struct sdl2::controller::GameController [−][src]
Wrapper around the SDL_GameController object
Implementations
impl GameController[src]
pub fn subsystem(&self) -> &GameControllerSubsystem[src]
pub fn name(&self) -> String[src]
Return the name of the controller or an empty string if no name is found.
pub fn mapping(&self) -> String[src]
Return a String describing the controller’s button and axis mappings
pub fn attached(&self) -> bool[src]
Return true if the controller has been opened and currently connected.
pub fn instance_id(&self) -> i32[src]
Return the joystick instance id of this controller
pub fn axis(&self, axis: Axis) -> i16[src]
Get the position of the given axis
pub fn button(&self, button: Button) -> bool[src]
Returns true if button is pressed.
Trait Implementations
impl Drop for GameController[src]
Auto Trait Implementations
impl !RefUnwindSafe for GameController
impl !Send for GameController
impl !Sync for GameController
impl Unpin for GameController
impl !UnwindSafe for GameController
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,