DOCS v0.1.13 github

@hatch:hud v0.1.6

Immediate-mode HUD overlay for the WrenLift game framework. HUD.new(g) gives you hud.label, hud.rect, hud.button — drawn through @hatch:gpu's Renderer2D, with click + hover state tracked across frames. Ships a built-in 5×7 procedural font (digits + uppercase + common punctuation) so HUD essentials (SCORE: 100, LIVES: 3, PAUSE) work without bringing an asset font. Adds HUDPanel — an immediate-mode debug control panel that stacks slider / toggle / button / text / divider rows top-down inside a fixed-width box so procedural-world demos can expose every knob (wind strength, water amplitude, sun angle, terrain seed) at runtime without rebuilding the bundle.

stable networking updated Jun 4, 2026 source ↗
$ hatch add @hatch:hud

MOD hud

CL BuiltinFont

FN BuiltinFont.static cellWidth → Num

FN BuiltinFont.static cellHeight → Num

FN BuiltinFont.static spacing → Num

FN BuiltinFont.static glyph(char: String) → List<Num>

FN BuiltinFont.static GLYPHS_

CL HUD

NEW HUD.new(g: GameState)

GET HUD.whiteTexture_ → Texture

GET HUD.endFrame

GET HUD.input_ → Input

FN HUD.static uploadWhitePixel_(device)

FN HUD.beginFrame(g: GameState, renderer: Renderer2D)

FN HUD.axisStepped_(code, input, threshold)

FN HUD.rect(x: Num, y: Num, w: Num, h: Num, color: List)

FN HUD.border(x: Num, y: Num, w: Num, h: Num, thickness: Num, color: List)

FN HUD.label(text: String, x: Num, y: Num, scale: Num)

FN HUD.label(text: String, x: Num, y: Num, scale: Num, color: List)

FN HUD.drawGlyph_(glyph, x, y, scale, color)

FN HUD.static measure(text: String, scale: Num) → List

FN HUD.button(text: String, x: Num, y: Num, w: Num, h: Num) → Bool

FN HUD.button(text: String, x: Num, y: Num, w: Num, h: Num, theme: Map) → Bool

FN HUD.static DEFAULT_BUTTON_THEME_

FN HUD.pointInside_(px, py, x, y, w, h)

FN HUD.pointInside(px, py, x, y, w, h)

CL HUDPanel

NEW HUDPanel.new(hud: HUD, opts: Map)

FN HUDPanel.static ROW_HEIGHT_

FN HUDPanel.static ROW_GAP_

FN HUDPanel.static TITLE_H_

FN HUDPanel.static LABEL_W_

FN HUDPanel.static PAD_

FN HUDPanel.static mergeTheme_(override)

FN HUDPanel.static DEFAULT_THEME_

FN HUDPanel.beginFrame()

FN HUDPanel.slider(label: String, obj: Map, key: String, min: Num, max: Num) → Num

FN HUDPanel.toggle(label: String, obj: Map, key: String) → Bool

FN HUDPanel.button(text: String, cb: Fn) → Bool

FN HUDPanel.static scaledButtonTheme_(scale)

FN HUDPanel.text(label: String, value: String|Num)

FN HUDPanel.divider()

FN HUDPanel.static formatNum_(n)