GameController class

A game controller.

Constructors

GameController(Sdl sdl, Pointer<SDL_GameController> handle)
Create an instance.

Properties

attached bool
Return true if this controller is open and attached.
no setter
handle Pointer<SDL_GameController>
The pointer for this object.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
joystick Joystick
Get the value of a joystick on this controller. SDL Docs
no setter
name String
Get the name of this controller.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdl Sdl
The SDL bindings to use.
finalinherited

Methods

close() → void
Close this controller.
destroy() → void
How this object should be destroyed.
inherited
getAxis(GameControllerAxis axis) int
Get the current state of an axis control on this game controller.
getAxisSmall(GameControllerAxis axis) double
Get the value of axis, as a number between -1.0 and 1.0.
getButton(GameControllerButton button) bool
Return true if button is pressed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited