Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Graphics.UI.GlfwG.Gamepad
Synopsis
- data GamepadButton
- = GamepadButton'A
- | GamepadButton'B
- | GamepadButton'X
- | GamepadButton'Y
- | GamepadButton'LeftBumper
- | GamepadButton'RightBumper
- | GamepadButton'Back
- | GamepadButton'Start
- | GamepadButton'Guide
- | GamepadButton'LeftThumb
- | GamepadButton'RightThumb
- | GamepadButton'DpadUp
- | GamepadButton'DpadRight
- | GamepadButton'DpadDown
- | GamepadButton'DpadLeft
- | GamepadButton'Cross
- | GamepadButton'Circle
- | GamepadButton'Square
- | GamepadButton'Triangle
- data GamepadAxis
- data GamepadButtonState
- data GamepadState = GamepadState {}
- joystickIsGamepad :: Joystick -> IO Bool
- getGamepadName :: Joystick -> IO (Maybe String)
- getGamepadState :: Joystick -> IO (Maybe GamepadState)
- updateGamepadMappings :: String -> IO Bool
Documentation
data GamepadButton #
The different types of buttons we can find on a Gamepad.
Constructors
Instances
data GamepadAxis #
The different axes along which we can measure continuous input on a Gamepad
Constructors
GamepadAxis'LeftX | |
GamepadAxis'LeftY | |
GamepadAxis'RightX | |
GamepadAxis'RightY | |
GamepadAxis'LeftTrigger | |
GamepadAxis'RightTrigger |
Instances
data GamepadButtonState #
The states in which the gamepad buttons are found
Instances
data GamepadState #
This describes the input state of a gamepad
Constructors
GamepadState | |
Fields
|
Instances
Generic GamepadState | |
Defined in Graphics.UI.GLFW.Types Associated Types type Rep GamepadState :: Type -> Type # | |
NFData GamepadState | |
Defined in Graphics.UI.GLFW.Types Methods rnf :: GamepadState -> () # | |
Eq GamepadState | |
Defined in Graphics.UI.GLFW.Types | |
type Rep GamepadState | |
Defined in Graphics.UI.GLFW.Types type Rep GamepadState = D1 ('MetaData "GamepadState" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.9.1-CbbIOqvtyyzkbPgJI2V5g" 'False) (C1 ('MetaCons "GamepadState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getButtonState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GamepadButton -> GamepadButtonState)) :*: S1 ('MetaSel ('Just "getAxisState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GamepadAxis -> Float)))) |
joystickIsGamepad :: Joystick -> IO Bool #
This function returns whether the specified joystick is both present and has a gamepad mapping. See glfwJoystickIsGamepad
getGamepadName :: Joystick -> IO (Maybe String) #
This function returns the human-readable name of the gamepad from the gamepad mapping assigned to the specified joystick. See glfwGetGamepadName
getGamepadState :: Joystick -> IO (Maybe GamepadState) #
This function retrives the state of the specified joystick remapped to an Xbox-like gamepad. See glfwGetGamepadState
updateGamepadMappings :: String -> IO Bool #
Adds the specified SDL_GameControllerDB gamepad mappings. See glfwUpdateGamepadMappings