Skip to content

smelt.overlay

Tier: UiHost — Requires a terminal UI; calling these from headless mode raises.

Overlay handle constructor. smelt.overlay.new(opts) opens an overlay from opts.layout (a smelt.overlay.layout userdata) and returns an Overlay userdata. opts.name opts the overlay into hot-reload survival. opts.width and opts.height size the overlay rect (per axis) using the same constraint vocabulary as layout.vbox/hbox slots — integer cells, "N%", "fit" (default; read the layout's natural size), "fill", "max:N", etc. opts.keymaps (list of {key, on_press, hint?}) installs overlay-scoped bindings. UiHost-only.

smelt.overlay.new

fun(opts: table): smelt.overlay.Overlay

Types: smelt.overlay.Overlay

Open an overlay rendered from opts.layout (a smelt.overlay.layout userdata) and return an Overlay userdata. opts.name opts the overlay into hot-reload survival. opts.width and opts.height size the overlay rect (per axis) using the same constraint vocabulary as layout.vbox/hbox slots — integer cells, "N%", "fit" (default; read the layout's natural size), "fill", "max:N", etc. opts.keymaps (list of {key, on_press, hint?}) installs overlay-scoped bindings.