ui

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGenericThumbnail

func CreateGenericThumbnail(text string) image.Image

func DrawCenteredText

func DrawCenteredText(dst draw.Image, text string, dx, dy int, c color.Color)

func DrawCharacter

func DrawCharacter(dst draw.Image, x, y int, ch byte, c color.Color)

func DrawText

func DrawText(dst draw.Image, x, y int, text string, c color.Color)

func Run

func Run(paths []string)

func WordWrap

func WordWrap(text string, maxLength int) []string

Types

type Audio

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

func NewAudio

func NewAudio() *Audio

func (*Audio) Callback

func (a *Audio) Callback(out []float32)

func (*Audio) Start

func (a *Audio) Start() error

func (*Audio) Stop

func (a *Audio) Stop() error

type Director

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

func NewDirector

func NewDirector(window *glfw.Window, audio *Audio) *Director

func (*Director) PlayGame

func (d *Director) PlayGame(path string)

func (*Director) Run

func (d *Director) Run()

func (*Director) SetTitle

func (d *Director) SetTitle(title string)

func (*Director) SetView

func (d *Director) SetView(view View)

func (*Director) ShowMenu

func (d *Director) ShowMenu()

func (*Director) Start

func (d *Director) Start(paths []string)

func (*Director) Step

func (d *Director) Step()

type GameView

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

func (*GameView) Enter

func (view *GameView) Enter()

func (*GameView) Exit

func (view *GameView) Exit()

func (*GameView) Update

func (view *GameView) Update(t, dt float64)
type MenuView struct {
	// contains filtered or unexported fields
}
func (view *MenuView) Enter()
func (view *MenuView) Exit()
func (view *MenuView) Update(t, dt float64)

type Texture

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

func NewTexture

func NewTexture() *Texture

func (*Texture) Bind

func (t *Texture) Bind()

func (*Texture) Lookup

func (t *Texture) Lookup(path string) (x, y, dx, dy float32)

func (*Texture) Purge

func (t *Texture) Purge()

func (*Texture) Unbind

func (t *Texture) Unbind()

type View

type View interface {
	Enter()
	Exit()
	Update(t, dt float64)
}

func NewGameView

func NewGameView(director *Director, console *nes.Console, title, hash string) View

func NewMenuView

func NewMenuView(director *Director, paths []string) View

Jump to

Keyboard shortcuts

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