gui

package
v0.0.0-...-658d513 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package gui implements different GUIs renderers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Image() *image.RGBA
	Dimensions() Dimensions
	WindowTitle() string

	KeyDown(key input.Key)
	KeyUp(key input.Key)
}

Backend is an interface that gets implemented by the backend using the selected GUI.

type Dimensions

type Dimensions struct {
	ScaleFactor float64

	Height int
	Width  int
}

Dimensions contains settings for the window dimensions of the rendered window.

type Initializer

type Initializer func(backend Backend) (guiRender func() (bool, error), guiCleanup func(), err error)

Initializer defines a setup function for the selected GUI renderer.

var Setup Initializer

Setup will be set by the chosen and imported GUI renderer. This function is the entrypoint for code importing this package to start the GUI.

Jump to

Keyboard shortcuts

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