smelt.paint¶
Tier: UiHost — Requires a terminal UI; calling these from headless mode raises.
Register Lua callbacks against custom paint regions. UiHost-only.
smelt.paint.register¶
Types: smelt.paint.Slice, smelt.paint.Paint
Register func as a paint callback and return an opaque Paint handle (userdata with :remove()). The handle is accepted anywhere a window id is in the layout / overlay APIs. The callback fires per frame the leaf is visible with a slice + context table. opts.name opts the slot into hot-reload survival: re-registering with the same name keeps the paint id stable and atomically swaps the callback, so surviving overlays/layouts referencing the handle keep painting with the new code.