textviewer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Props

type Props struct {
	scene.Attrs

	// FontFace to draw text with.
	FontFace font.Face

	// JustifyLines specifies justification of text lines. Default is [textview.JustifyCenter].
	JustifyLines basic.Opt[textview.Justify]

	// JustifyWords specifies justification of text words within line. Default is [textview.JustifyCenter].
	JustifyWords basic.Opt[textview.Justify]

	// Text to display.
	Text string

	// TextColor to draw text with.
	TextColor color.Color
}

Props associated with TextViewer.

func (Props) Func

func (p Props) Func(Props) Props

Func returns these props.

type TextViewer

type TextViewer[T any] interface {
	scene.Element[*ebiten.Image, T]
}

TextViewer extended by trait of type T.

func New

func New[T any](traitFunc scene.TraitFunc[T], propsFunc scene.PropsFunc[Props]) TextViewer[T]

New initializes and returns new TextViewer.

Jump to

Keyboard shortcuts

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