HGamer3D-SFML-Binding-0.1.8: Library to enable 3D game development for Haskell - SFML Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.SFML.ClassJoystick

Synopsis

Documentation

isConnectedSource

Arguments

:: Int

joystick - Index of the joystick to check

-> IO Bool

return value - True if the joystick is connected, false otherwise

Check if a joystick is connected.

getButtonCountSource

Arguments

:: Int

joystick

-> IO Int 

Return the number of buttons supported by a joystick. - Details: If the joystick is not connected, this function returns 0.

hasAxisSource

Arguments

:: Int

joystick

-> EnumJoystickAxis

axis

-> IO Bool 

Check if a joystick supports a given axis. - Details: If the joystick is not connected, this function returns false.

isButtonPressedSource

Arguments

:: Int

joystick

-> Int

button

-> IO Bool 

Check if a joystick button is pressed. - Details: If the joystick is not connected, this function returns false.

getAxisPositionSource

Arguments

:: Int

joystick

-> EnumJoystickAxis

axis

-> IO Float 

Get the current position of a joystick axis. - Details: If the joystick is not connected, this function returns 0.

updateSource

Arguments

:: IO () 

Update the states of all joysticks. - Details: This function is used internally by SFML, so you normally don't have to call it explicitely. However, you may need to call it if you have no window yet (or no window at all): in this case the joysticks states are not updated automatically.