input

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KeyEscape = Key(glfw.KeyEscape)
	KeyUp     = Key(glfw.KeyUp)
	KeyDown   = Key(glfw.KeyDown)
	KeyLeft   = Key(glfw.KeyLeft)
	KeyRight  = Key(glfw.KeyRight)
	KeyEnter  = Key(glfw.KeyEnter)
	KeyA      = Key(glfw.KeyA)
	KeyB      = Key(glfw.KeyB)
	KeyC      = Key(glfw.KeyC)
	KeyD      = Key(glfw.KeyD)
	KeyE      = Key(glfw.KeyE)
	KeyF      = Key(glfw.KeyF)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gamepad

type Gamepad struct {
	Available    bool
	LeftStickX   float32
	LeftStickY   float32
	RightStickX  float32
	RightStickY  float32
	LeftTrigger  float32
	RightTrigger float32
	LeftBumper   bool
	RightBumper  bool
}

func NewGamepad

func NewGamepad() *Gamepad

type GamepadRecorder

type GamepadRecorder struct {
	// contains filtered or unexported fields
}

func NewGamepadRecorder

func NewGamepadRecorder() *GamepadRecorder

func (*GamepadRecorder) Fetch

func (r *GamepadRecorder) Fetch() *Gamepad

func (*GamepadRecorder) Record

func (r *GamepadRecorder) Record()

func (*GamepadRecorder) Release

func (r *GamepadRecorder) Release(gamepad *Gamepad)

type Key

type Key int

type Keyboard

type Keyboard struct {
	// contains filtered or unexported fields
}

func NewKeyboard

func NewKeyboard() *Keyboard

func (*Keyboard) IsPressed

func (k *Keyboard) IsPressed(key Key) bool

type KeyboardRecorder

type KeyboardRecorder struct {
	// contains filtered or unexported fields
}

func NewKeyboardRecorder

func NewKeyboardRecorder(window *glfw.Window) *KeyboardRecorder

func (*KeyboardRecorder) Fetch

func (r *KeyboardRecorder) Fetch() *Keyboard

func (*KeyboardRecorder) Record

func (r *KeyboardRecorder) Record()

func (*KeyboardRecorder) Release

func (r *KeyboardRecorder) Release(keyboard *Keyboard)

Jump to

Keyboard shortcuts

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