C# Class SFML.Window.Joystick

Give access to the real-time state of the joysticks
Afficher le fichier Open project: SFML/SFML.Net

Méthodes publiques

Свойство Type Description
AxisCount uint
ButtonCount uint
Count uint

Méthodes publiques

Méthode Description
GetAxisPosition ( uint joystick, Axis axis ) : float

Get the current position of a joystick axis

GetButtonCount ( uint joystick ) : uint

Return the number of buttons supported by a joystick

GetIdentification ( uint joystick ) : Identification

Get the joystick information

HasAxis ( uint joystick, Axis axis ) : bool

Check if a joystick supports a given axis

IsButtonPressed ( uint joystick, uint button ) : bool

Check if a joystick button is pressed

IsConnected ( uint joystick ) : bool

Check if a joystick is connected

Update ( ) : void

Update the states of all joysticks

Private Methods

Méthode Description
sfJoystick_getAxisPosition ( uint joystick, Axis axis ) : float
sfJoystick_getButtonCount ( uint joystick ) : uint
sfJoystick_getIdentification ( uint joystick ) : IdentificationMarshalData
sfJoystick_hasAxis ( uint joystick, Axis axis ) : bool
sfJoystick_isButtonPressed ( uint joystick, uint button ) : bool
sfJoystick_isConnected ( uint joystick ) : bool
sfJoystick_update ( ) : void

Method Details

GetAxisPosition() public static méthode

Get the current position of a joystick axis
public static GetAxisPosition ( uint joystick, Axis axis ) : float
joystick uint Index of the joystick
axis Axis Axis to check
Résultat float

GetButtonCount() public static méthode

Return the number of buttons supported by a joystick
public static GetButtonCount ( uint joystick ) : uint
joystick uint Index of the joystick
Résultat uint

GetIdentification() public static méthode

Get the joystick information
public static GetIdentification ( uint joystick ) : Identification
joystick uint Index of the joystick
Résultat Identification

HasAxis() public static méthode

Check if a joystick supports a given axis
public static HasAxis ( uint joystick, Axis axis ) : bool
joystick uint Index of the joystick
axis Axis Axis to check
Résultat bool

IsButtonPressed() public static méthode

Check if a joystick button is pressed
public static IsButtonPressed ( uint joystick, uint button ) : bool
joystick uint Index of the joystick
button uint Button to check
Résultat bool

IsConnected() public static méthode

Check if a joystick is connected
public static IsConnected ( uint joystick ) : bool
joystick uint Index of the joystick to check
Résultat bool

Update() public static méthode

Update the states of all joysticks
public static Update ( ) : void
Résultat void

Property Details

AxisCount public_oe static_oe property

Maximum number of supported axes
public static uint AxisCount
Résultat uint

ButtonCount public_oe static_oe property

Maximum number of supported buttons
public static uint ButtonCount
Résultat uint

Count public_oe static_oe property

Maximum number of supported joysticks
public static uint Count
Résultat uint