Skip to content

label.um

Marek Maskarinec edited this page Oct 9, 2022 · 2 revisions

label.um

struct Label*

type Label* = struct {
	g: ui.Generic
	text: str
	renderer: ui.TextRenderer
	center: bool
	wrapping: bool
	scale: th.fu
}

An element containing a TextRenderer. The text renderer supports word-wrapping and centered text.

fn mk*

fn mk*(f: ui.TextRenderer, text: str, theme: ui.Theme, scale: th.fu, center: bool = false, wrapping: bool = false): Label {

Label constructor

fn get*

fn (l: ^Label) get*(): ^ui.Generic {

fn handle*

fn (l: ^Label) handle*() {

fn draw*

fn (l: ^Label) draw*() {

Clone this wiki locally