ui

package
v0.0.0-...-67e2934 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TextAtlas *text.Atlas

Functions

func Button

func Button(win *pixelgl.Window, location pixel.Rect, label string) bool

func Finish

func Finish(win *pixelgl.Window)

Finish up after IMGUI code, end frame

func Label

func Label(win *pixelgl.Window, location pixel.Rect, value string, color color.Color)

func LoadPicture

func LoadPicture(path string) (pixel.Picture, error)
func Menu(win *pixelgl.Window, location pixel.Rect, items []string) int

func Prepare

func Prepare()

Prepare for IMGUI code

Types

type FlexMapper

type FlexMapper func(i int) pixel.Rect

A function that returns bounding rectangle for i-th element of flexbox (starting from 0)

func FlexColumns

func FlexColumns(parentBounds pixel.Rect, width, height, spacing float64, n int) FlexMapper

Rectangles inside parent stacked horizontally, with given size and spacing, n of them

func FlexRows

func FlexRows(parentBounds pixel.Rect, width, height, spacing float64, n int) FlexMapper

Rectangles inside parent stacked vertically, with given size and spacing, n of them

type Scene

type Scene interface {
	Loop(w *pixelgl.Window) Scene
}

Returns self or next scene on each iteration

type UiState

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

Jump to

Keyboard shortcuts

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