gamepaddb

package
v2.2.0-alpha.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 driver.StandardGamepadAxis, state GamepadState) float64

func HasStandardLayoutMapping

func HasStandardLayoutMapping(id string) bool

func IsButtonPressed

func IsButtonPressed(id string, button driver.StandardGamepadButton, state GamepadState) bool

Types

type GamepadState

type GamepadState interface {
	Axis(index int) float64
	Button(index int) bool
	Hat(index int) int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL