ui

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INFO level = iota
	WARN
	ERROR
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

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

func NewButton

func NewButton(x, y, width, height int, label string, onClick func()) *Button

func (*Button) Draw

func (b *Button) Draw(screen *ebiten.Image)

func (*Button) Label

func (b *Button) Label() string

func (*Button) Layout

func (b *Button) Layout(outsideWidth, outsideHeight int)

func (*Button) MoveTo

func (b *Button) MoveTo(x, y int)

func (*Button) SetDisabled

func (b *Button) SetDisabled(disabled bool)

func (*Button) SetLabel

func (b *Button) SetLabel(label string)

func (*Button) Update

func (b *Button) Update() error

type Component

type Component interface {
	Update() error
	Draw(screen *ebiten.Image)
	Layout(outsideWidth, outsideHeight int)
}

type Explorer

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

func NewExplorer

func NewExplorer(onPick func(s sprite.Sprite)) *Explorer

func (*Explorer) AppendSprite

func (e *Explorer) AppendSprite(sprite sprite.Sprite)

func (*Explorer) Draw

func (e *Explorer) Draw(screen *ebiten.Image)

func (*Explorer) Layout

func (e *Explorer) Layout(outsideWidth, outsideHeight int)

func (*Explorer) Update

func (e *Explorer) Update() error
type Link struct {
	// contains filtered or unexported fields
}
func NewLink(x, y int, label string, onClick func()) *Link

func (*Link) Draw

func (l *Link) Draw(screen *ebiten.Image)

func (*Link) Layout

func (l *Link) Layout(outsideWidth, outsideHeight int)

func (*Link) MoveTo

func (l *Link) MoveTo(x, y int)

func (*Link) SetDisabled

func (l *Link) SetDisabled(disabled bool)

func (*Link) SetLabel

func (l *Link) SetLabel(label string)

func (*Link) Update

func (l *Link) Update() error
type Menu struct {
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(children []Component) *Menu
func (m *Menu) Draw(screen *ebiten.Image)
func (m *Menu) Layout(outsideWidth, outsideHeight int)
func (m *Menu) Update() error

type Noticer

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

func NewNoticer

func NewNoticer() *Noticer

func (*Noticer) AddNotice

func (n *Noticer) AddNotice(level level, message string)

func (*Noticer) Draw

func (n *Noticer) Draw(screen *ebiten.Image)

func (*Noticer) Layout

func (n *Noticer) Layout(outsideWidth, outsideHeight int)

func (*Noticer) Update

func (n *Noticer) Update() error

type Player

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

func NewPlayer

func NewPlayer(name string, noticer *Noticer, funcMap map[string]func()) *Player

func (*Player) Append

func (p *Player) Append(sprite sprite.Sprite)

func (*Player) Draw

func (p *Player) Draw(screen *ebiten.Image)

func (*Player) Import

func (p *Player) Import(a *animation.Animation)

func (*Player) Layout

func (p *Player) Layout(outsideWidth, outsideHeight int)

func (*Player) RawAnimation

func (p *Player) RawAnimation() *animation.Animation

func (*Player) Rename

func (p *Player) Rename(name string)

func (*Player) Stop

func (p *Player) Stop()

func (*Player) Update

func (p *Player) Update() error

Jump to

Keyboard shortcuts

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