ebitenguidemo

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

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

Ebiten GUI Demo

A GUI demonstration in Ebiten. This is work in progress.

git clone https://github.com/hajimehoshi/ebitenguidemo
cd ebitenguidemo
wasmserve -tags=example ./example/image

and open http://localhost:8080 on your browser.

Resources

Pixel UI pack

https://www.kenney.nl/assets/pixel-ui-pack (CC0 1.0 License)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Update(gui *GUI) error
	Draw(screen *ebiten.Image)
}

type Checkbox

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

func (*Checkbox) Draw

func (c *Checkbox) Draw(screen *ebiten.Image)

type GUI

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

func (*GUI) NewCheckbox

func (g *GUI) NewCheckbox(x, y int) *Checkbox

func (*GUI) NewLabel

func (g *GUI) NewLabel(x, y int, text string) *Label

func (*GUI) NewNumberField

func (g *GUI) NewNumberField(bounds image.Rectangle) *NumberField

func (*GUI) NewTextField

func (g *GUI) NewTextField(bounds image.Rectangle) *TextField

type Label

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

type NumberField

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

func (*NumberField) Draw

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

func (*NumberField) SetOnChange

func (n *NumberField) SetOnChange(f func(*NumberField))

func (*NumberField) SetValue

func (n *NumberField) SetValue(v float64)

func (*NumberField) Value

func (n *NumberField) Value() float64

type TextField

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

func (*TextField) Draw

func (t *TextField) Draw(screen *ebiten.Image)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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