nesinput

package
v0.0.0-...-fa24f98 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ButtonA = iota
	ButtonB
	ButtonSelect
	ButtonStart
	ButtonUp
	ButtonDown
	ButtonLeft
	ButtonRight
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonDevice

type ButtonDevice interface {
	Pressed(key byte) bool
}

type Generic

type Generic struct {
	ButtonDevice

	OUT0 bool
	// contains filtered or unexported fields
}

func NewGamepad

func NewGamepad(id ebiten.GamepadID) (*Generic, error)

func NewKeyboard

func NewKeyboard() *Generic

func (*Generic) Read

func (c *Generic) Read() byte

func (*Generic) Write

func (c *Generic) Write(value byte)

Jump to

Keyboard shortcuts

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