ui

package
v0.0.0-...-fbb1d58 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UI

type UI struct {
	Play *core.Play
	// contains filtered or unexported fields
}

UI implements ebiten.UI interface.

func NewUI

func NewUI() *UI

func (*UI) Draw

func (u *UI) Draw(screen *ebiten.Image)

Draw draws the UI screen. Draw is called every frame (typically 1/60[s] for 60Hz display).

func (*UI) Layout

func (u *UI) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

Layout takes the outside size (e.u., the window size) and returns the (logical) screen size. If you don't have to adjust the screen size with the outside size, just return a fixed size.

func (*UI) Render

func (u *UI) Render()

func (*UI) Update

func (u *UI) Update() error

Update proceeds the UI state. Update is called every tick (1/60 [s] by default).

Jump to

Keyboard shortcuts

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