Back to

Package input

Latest Go to latest

The highest tagged major version is .

Published: Feb 26, 2020 | License: Apache-2.0 | Module:


func AnyGamepadAbstractButtonPressed

func AnyGamepadAbstractButtonPressed(i *Input) bool

AnyGamepadAbstractButtonPressed returns the specified button was pressed or not.

type Input

type Input struct {
	// contains filtered or unexported fields

Input manages the input state including gamepads and keyboards.

func (*Input) IsAnyGamepadButtonPressed

func (i *Input) IsAnyGamepadButtonPressed() bool

IsAnyGamepadButtonPressed returns a boolean value indicating whether any gamepad button is pressed.

func (*Input) IsRotateLeftJustPressed

func (i *Input) IsRotateLeftJustPressed() bool

IsRotateLeftJustPressed check the left rotate was pressed or not.

func (*Input) IsRotateRightJustPressed

func (i *Input) IsRotateRightJustPressed() bool

IsRotateRightJustPressed check the right rotate was pressed or not.

func (*Input) StateForDown

func (i *Input) StateForDown() int

StateForDown returns the count of the down button was pressed.

func (*Input) StateForKey

func (i *Input) StateForKey(key ebiten.Key) int

StateForKey returns time length indicating how long the key is pressed.

func (*Input) StateForLeft

func (i *Input) StateForLeft() int

StateForLeft returns the count of the left button was pressed.

func (*Input) StateForRight

func (i *Input) StateForRight() int

StateForRight returns the count of the right button was pressed.

func (*Input) Update

func (i *Input) Update()

Update updates the key state.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier