uitil

package
v0.0.0-...-8b39f33 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WordWrap

func WordWrap(d ui.Drawer, text string, bounds geom.Rectangle)

WordWrap draws text to the screen, bounded by the given rectangle. The special token "[br]" inserts a line break. Any text that does not fit beyond bounds.Max.Y is truncated.

Types

type MessageBox

type MessageBox struct {
	Text   string //TODO(mccoyst): Implement paging
	Font   string
	Fontsz float64
	Fg, Bg color.Color
	Box    geom.Rectangle
	Pad    float64
	// contains filtered or unexported fields
}

func (*MessageBox) Draw

func (mb *MessageBox) Draw(d ui.Drawer)

func (*MessageBox) Handle

func (mb *MessageBox) Handle(stk *ui.ScreenStack, e ui.Event) error

func (*MessageBox) Transparent

func (mb *MessageBox) Transparent() bool

func (*MessageBox) Update

func (mb *MessageBox) Update(stk *ui.ScreenStack) error

Jump to

Keyboard shortcuts

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