Safe Haskell | Safe-Infered |
---|
- isConnected :: Int -> IO Bool
- getButtonCount :: Int -> IO Int
- hasAxis :: Int -> EnumJoystickAxis -> IO Bool
- isButtonPressed :: Int -> Int -> IO Bool
- getAxisPosition :: Int -> EnumJoystickAxis -> IO Float
- update :: IO ()
- isConnected'_ :: CUInt -> Ptr CInt -> IO ()
- getButtonCount'_ :: CUInt -> Ptr CUInt -> IO ()
- hasAxis'_ :: CUInt -> CInt -> Ptr CInt -> IO ()
- isButtonPressed'_ :: CUInt -> CUInt -> Ptr CInt -> IO ()
- getAxisPosition'_ :: CUInt -> CInt -> Ptr CFloat -> IO ()
- update'_ :: IO ()
Documentation
:: 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.
Return the number of buttons supported by a joystick. - Details: If the joystick is not connected, this function returns 0.
:: 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.
Check if a joystick button is pressed. - Details: If the joystick is not connected, this function returns false.
:: 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.
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.