ebievent

package module
v0.0.0-...-b570e20 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

Documentation

Index

Constants

View Source
const (
	EClick   = "click"
	EKeyDown = "keydown"
	EKeyUp   = "keyup"
	EWheel   = "wheel"
)

Default event type

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickEvent

type ClickEvent interface {
	Position() (int, int)
	event.Event
}

type Game

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

func (*Game) AddEventListener

func (g *Game) AddEventListener(name string, listener event.Listener)

copied code from same function in go-event lib

func (*Game) DispatchEvent

func (g *Game) DispatchEvent(origevent event.NonDispatchedEvent) (result bool)

func (*Game) RemoveEventListener

func (g *Game) RemoveEventListener(name string, listener event.Listener)

copied code from same function in go-event lib

func (*Game) Update

func (g *Game) Update() error

Update implements the ebiten.Game interface

type KeyPosition

type KeyPosition int
const (
	KeyInLeft KeyPosition = 1 << iota
	KeyInRight
	KeyIsPressed
)
const KeyNotPress KeyPosition = 0

type KeyboardEvent

type KeyboardEvent interface {
	event.Event

	Keys() []ebiten.Key
	Ctrl() KeyPosition
	Alt() KeyPosition
	Shift() KeyPosition
}

type WheelEvent

type WheelEvent interface {
	event.Event
	Wheel() (x, y float64)
}

Jump to

Keyboard shortcuts

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