ebitenui

package module
Version: v0.0.0-...-686fc9c Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: MIT Imports: 6 Imported by: 3

README

Build Status Quality Gate Status Coverage Status GoDoc

Ebiten UI

A user interface engine and widget library for Ebiten

Ebiten UI is an extension to Ebiten that provides an engine to render a complete user interface, with widgets such as buttons, lists, combo boxes, and so on. It uses the retained mode model. All graphics used by Ebiten UI can be fully customized, so you can really make your UI your own.

Documentation on how to use and extend Ebiten UI is available at ebitenui.github.io.

Ebiten UI is currently under development and should not yet be used in production.

Screenshots

License

Ebiten UI is licensed under the MIT license.

Documentation

Overview

Package ebitenui contains the main UI type that renders a complete user interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoveWindowFunc

type RemoveWindowFunc func()

RemoveWindowFunc is a function to remove a Window from rendering.

type UI

type UI struct {
	// Container is the root container of the UI hierarchy.
	Container *widget.Container

	// ToolTip is used to render mouse hover tool tips. It may be nil to disable rendering.
	ToolTip *widget.ToolTip

	// DragAndDrop is used to render drag widgets while dragging and dropping. It may be nil to disable rendering.
	DragAndDrop *widget.DragAndDrop
	// contains filtered or unexported fields
}

UI encapsulates a complete user interface that can be rendered onto the screen. There should only be exactly one UI per application.

func (*UI) AddWindow

func (u *UI) AddWindow(w *widget.Window) RemoveWindowFunc

AddWindow adds window w to u for rendering. It returns a function to remove w from u.

func (*UI) Draw

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

Draw renders u onto screen. This function should be called in the Ebiten Draw function.

If screen's size changes from one frame to the next, u.Container.RequestRelayout is called.

func (*UI) Update

func (u *UI) Update()

Update updates u. This method should be called in the Ebiten Update function.

Source Files

Directories

Path Synopsis
_demo module
_scaffold module
Package event contains types to deal with firing and handling events.
Package event contains types to deal with firing and handling events.
Package image contains types to deal with nine-slice images, buffered (cached) images, as well as drawing using masks.
Package image contains types to deal with nine-slice images, buffered (cached) images, as well as drawing using masks.
Package input deals with user input such as mouse button clicks, scroll wheel movement etc.
Package input deals with user input such as mouse button clicks, scroll wheel movement etc.
Package widget contains various widget implementations such as buttons, checkboxes, combo boxes, lists etc.
Package widget contains various widget implementations such as buttons, checkboxes, combo boxes, lists etc.
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto