desktop

package
v0.0.0-...-e43d3ec Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FontColor              = color.NRGBA{R: 255, G: 255, B: 255, A: 255}
	OverlayBackgroundColor = color.NRGBA{R: 55, G: 55, B: 55, A: 255}
	BackgroundColor        = color.NRGBA{G: 45, B: 123, A: 255}
	ForegroundColor        = color.NRGBA{G: 145, B: 223, A: 255}
	HoverColor             = color.NRGBA{R: 100, G: 45, B: 123, A: 255}
)
View Source
var (
	PaddingOut = ebui.Outset{
		Top:    6,
		Bottom: 6,
		Left:   6,
		Right:  6,
	}
	PaddingIn = ebui.Inset{
		Top:    6,
		Bottom: 6,
		Left:   6,
		Right:  6,
	}
	IconSize     = image.Pt(20, 20)
	StrokeWidth  = 3
	OutlineWidth = 2
	Radius       = 6
)
View Source
var Face font.Face

Functions

This section is empty.

Types

type Button

type Button struct {
	Click  ebui.Clickable
	Widget ebui.Widget
}

func (*Button) Draw

func (b *Button) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Button) Size

func (b *Button) Size(viewsize image.Point) image.Point

type Checkbox

type Checkbox struct {
	Checked bool
	// contains filtered or unexported fields
}

func (*Checkbox) Draw

func (b *Checkbox) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Checkbox) Size

func (b *Checkbox) Size(viewsize image.Point) image.Point

type Combobox

type Combobox struct {
	// List of items.
	Widgets ebui.WidgetList
	// Selected item from the list.
	Selected int
	// Dims of the selection.
	Dims image.Point
	// contains filtered or unexported fields
}

func (*Combobox) Draw

func (c *Combobox) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Combobox) Size

func (c *Combobox) Size(viewsize image.Point) image.Point

type Input

type Input struct {
	ebui.LineEditor
}

func (*Input) Draw

func (in *Input) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Input) Size

func (in *Input) Size(viewsize image.Point) image.Point

type List

type List struct {
	ebui.List
	// Expand hovering and clicking cross axis.
	Expand bool
	// contains filtered or unexported fields
}

List implements a hoverable and clickable list.

func (*List) ClickedAt

func (l *List) ClickedAt() int

ClickedAt returns the clicked index or -1.

func (*List) Draw

func (l *List) Draw(screen *ebiten.Image, viewport image.Rectangle)

type ProgressBar

type ProgressBar struct {
	Axis  ebui.Axis
	Value float32
}

func (*ProgressBar) Draw

func (p *ProgressBar) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*ProgressBar) Size

func (p *ProgressBar) Size(viewsize image.Point) image.Point

type Slider

type Slider struct {
	ebui.Slider
}

func (*Slider) Draw

func (s *Slider) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Slider) Size

func (s *Slider) Size(viewsize image.Point) image.Point

type Spinner

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

func (*Spinner) Draw

func (s *Spinner) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Spinner) Size

func (s *Spinner) Size(viewsize image.Point) image.Point

type Tabs

type Tabs struct {
	Selected int
	Tabs     List
	Content  ebui.WidgetList
}

func (*Tabs) Draw

func (t *Tabs) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Tabs) Size

func (t *Tabs) Size(viewsize image.Point) image.Point

type Tree

type Tree[T comparable] struct {
	ebui.Tree[T]
}

func (*Tree[T]) Draw

func (t *Tree[T]) Draw(screen *ebiten.Image, viewport image.Rectangle)

func (*Tree[T]) Size

func (t *Tree[T]) Size(viewsize image.Point) image.Point

Jump to

Keyboard shortcuts

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