input

package
v0.0.0-...-7a6bf91 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEYBOARD_INPUT_TYPE = 1
	GAMEPAD_INPUT_TYPE  = 2
	MOUSE_INPUT_TYPE    = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionHandler

type ActionHandler interface {
	IsActionJustPressed(string) bool
	IsActionJustReleased(string) bool
	ActionPressedDuration(string) int
}

type InputActionHandler

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

func NewInputActionHandler

func NewInputActionHandler() InputActionHandler

func (InputActionHandler) ActionPressedDuration

func (i InputActionHandler) ActionPressedDuration(action string) int

func (InputActionHandler) IsActionJustPressed

func (i InputActionHandler) IsActionJustPressed(action string) bool

func (InputActionHandler) IsActionJustReleased

func (i InputActionHandler) IsActionJustReleased(action string) bool

func (*InputActionHandler) RegisterGamepadAction

func (i *InputActionHandler) RegisterGamepadAction(action string, id ebiten.GamepadID, key ebiten.GamepadButton)

func (*InputActionHandler) RegisterKeyboardAction

func (i *InputActionHandler) RegisterKeyboardAction(action string, key ebiten.Key)

func (*InputActionHandler) RegisterMouseAction

func (i *InputActionHandler) RegisterMouseAction(action string, key ebiten.MouseButton)

func (*InputActionHandler) UnregisterAction

func (i *InputActionHandler) UnregisterAction(action string)

Jump to

Keyboard shortcuts

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