input

package
Version: v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapters

type Adapters interface {
	//Keyboard returns the KeyboardAdapter
	Keyboard() KeyboardAdapter
}

Adapters gives access to all input adapters

type ButtonType

type ButtonType int

ButtonType defines a controller button

const (
	ButtonA ButtonType = iota
	ButtonB
	ButtonX
	ButtonY
	ButtonStart
	ButtonSelect
)

type Controller

type Controller interface {
	ButtonPressed(buttonType ButtonType) (bool, error)
}

Controller gives access to a connected gamecontroller

type KeyboardAdapter

type KeyboardAdapter interface {
	//KeyPressed returns true, if the key is currently pressed
	KeyPressed(keyType primitives.KeyType) (bool, error)
}

KeyboardAdapter gives access to the computers keyboard

Jump to

Keyboard shortcuts

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