Documentation ¶
Index ¶
- Constants
- func AxisValue(id string, axis StandardAxis, state GamepadState) float64
- func ButtonValue(id string, button StandardButton, state GamepadState) float64
- func HasStandardLayoutMapping(id string) bool
- func IsButtonPressed(id string, button StandardButton, state GamepadState) bool
- func Name(id string) string
- func Update(mappingData []byte) (bool, error)
- type GamepadState
- type StandardAxis
- type StandardButton
Constants ¶
View Source
const ( HatUp = 1 HatRight = 2 HatDown = 4 HatLeft = 8 )
Variables ¶
This section is empty.
Functions ¶
func AxisValue ¶
func AxisValue(id string, axis StandardAxis, state GamepadState) float64
func ButtonValue ¶
func ButtonValue(id string, button StandardButton, state GamepadState) float64
func IsButtonPressed ¶
func IsButtonPressed(id string, button StandardButton, state GamepadState) bool
Types ¶
type GamepadState ¶
type StandardAxis ¶ added in v2.3.0
type StandardAxis int
const ( StandardAxisLeftStickHorizontal StandardAxis = iota StandardAxisLeftStickVertical StandardAxisRightStickHorizontal StandardAxisRightStickVertical StandardAxisMax = StandardAxisRightStickVertical )
type StandardButton ¶ added in v2.3.0
type StandardButton int
const ( StandardButtonRightBottom StandardButton = iota StandardButtonRightRight StandardButtonRightLeft StandardButtonRightTop StandardButtonFrontTopLeft StandardButtonFrontTopRight StandardButtonFrontBottomLeft StandardButtonFrontBottomRight StandardButtonCenterLeft StandardButtonCenterRight StandardButtonLeftStick StandardButtonRightStick StandardButtonLeftTop StandardButtonLeftBottom StandardButtonLeftLeft StandardButtonLeftRight StandardButtonCenterCenter StandardButtonMax = StandardButtonCenterCenter )
Click to show internal directories.
Click to hide internal directories.