ebitenui

package module
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 6 Imported by: 32

README

GitHub release (latest by date including pre-releases) GitHub GoDoc GoDoc

Discord Subreddit subscribers

Ebiten UI

A user interface engine and widget library for Ebitengine

Ebiten UI is an extension to Ebitengine that provides the ability 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.

Screenshots

Used By

Social Media

License

Ebiten UI is licensed under the MIT license.

Maintainers

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 FocusDirection added in v0.3.3

type FocusDirection int
const (
	FOCUS_NEXT FocusDirection = iota
	FOCUS_PREVIOUS
)

type UI

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

	//If true the default tab/shift-tab to focus will be disabled
	DisableDefaultFocus bool
	// 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) widget.RemoveWindowFunc

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

func (*UI) ChangeFocus added in v0.3.3

func (u *UI) ChangeFocus(direction FocusDirection)

func (*UI) ClearFocus added in v0.3.0

func (u *UI) ClearFocus()

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.

func (*UI) GetFocusedWidget added in v0.4.3

func (u *UI) GetFocusedWidget() widget.Focuser

func (*UI) HasFocus

func (u *UI) HasFocus() bool

func (*UI) IsWindowOpen added in v0.3.3

func (u *UI) IsWindowOpen(w *widget.Window) bool

func (*UI) Update

func (u *UI) Update()

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

Directories

Path Synopsis
_examples
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.
utilities
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.

Jump to

Keyboard shortcuts

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