Documentation ¶
Index ¶
- Constants
- func SetNativeWindow(nativeWindow uintptr)
- func Update() error
- type Button
- type Gamepad
- func (g *Gamepad) Axis(axis int) float64
- func (g *Gamepad) AxisCount() int
- func (g *Gamepad) Button(button int) bool
- func (g *Gamepad) ButtonCount() int
- func (g *Gamepad) Hat(hat int) int
- func (g *Gamepad) HatCount() int
- func (g *Gamepad) IsStandardAxisAvailable(axis gamepaddb.StandardAxis) bool
- func (g *Gamepad) IsStandardButtonAvailable(button gamepaddb.StandardButton) bool
- func (g *Gamepad) IsStandardButtonPressed(button gamepaddb.StandardButton) bool
- func (g *Gamepad) IsStandardLayoutAvailable() bool
- func (g *Gamepad) Name() string
- func (g *Gamepad) SDLID() string
- func (g *Gamepad) StandardAxisValue(axis gamepaddb.StandardAxis) float64
- func (g *Gamepad) StandardButtonValue(button gamepaddb.StandardButton) float64
- func (g *Gamepad) Vibrate(duration time.Duration, strongMagnitude float64, weakMagnitude float64)
- type ID
Constants ¶
View Source
const ButtonCount = 32
Variables ¶
This section is empty.
Functions ¶
func SetNativeWindow ¶ added in v2.4.0
func SetNativeWindow(nativeWindow uintptr)
Types ¶
type Button ¶
type Button int
const ( Button0 Button = iota Button1 Button2 Button3 Button4 Button5 Button6 Button7 Button8 Button9 Button10 Button11 Button12 Button13 Button14 Button15 Button16 Button17 Button18 Button19 Button20 Button21 Button22 Button23 Button24 Button25 Button26 Button27 Button28 Button29 Button30 Button31 )
type Gamepad ¶
type Gamepad struct {
// contains filtered or unexported fields
}
func (*Gamepad) IsStandardAxisAvailable ¶ added in v2.4.0
func (g *Gamepad) IsStandardAxisAvailable(axis gamepaddb.StandardAxis) bool
IsStandardAxisAvailable is concurrent safe.
func (*Gamepad) IsStandardButtonAvailable ¶ added in v2.4.0
func (g *Gamepad) IsStandardButtonAvailable(button gamepaddb.StandardButton) bool
IsStandardButtonAvailable is concurrent safe.
func (*Gamepad) IsStandardButtonPressed ¶
func (g *Gamepad) IsStandardButtonPressed(button gamepaddb.StandardButton) bool
IsStandardButtonPressed is concurrent-safe.
func (*Gamepad) IsStandardLayoutAvailable ¶
IsStandardLayoutAvailable is concurrent-safe.
func (*Gamepad) StandardAxisValue ¶
func (g *Gamepad) StandardAxisValue(axis gamepaddb.StandardAxis) float64
StandardAxisValue is concurrent-safe.
func (*Gamepad) StandardButtonValue ¶
func (g *Gamepad) StandardButtonValue(button gamepaddb.StandardButton) float64
StandardButtonValue is concurrent-safe.
Click to show internal directories.
Click to hide internal directories.