C# Class SFML.Window.Joystick

Give access to the real-time state of the joysticks
Exibir arquivo Open project: SFML/SFML.Net

Public Properties

Property Type Description
AxisCount uint
ButtonCount uint
Count uint

Public Methods

Method 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

Method 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 method

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
return float

GetButtonCount() public static method

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

GetIdentification() public static method

Get the joystick information
public static GetIdentification ( uint joystick ) : Identification
joystick uint Index of the joystick
return Identification

HasAxis() public static method

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
return bool

IsButtonPressed() public static method

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
return bool

IsConnected() public static method

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

Update() public static method

Update the states of all joysticks
public static Update ( ) : void
return void

Property Details

AxisCount public_oe static_oe property

Maximum number of supported axes
public static uint AxisCount
return uint

ButtonCount public_oe static_oe property

Maximum number of supported buttons
public static uint ButtonCount
return uint

Count public_oe static_oe property

Maximum number of supported joysticks
public static uint Count
return uint