Builtin Library
README.md
window
Floating window. Root-only — must be the top-level widget of its
registered screen. Pass movable, resizable, closable, pos
(default position, only honored on first frame), and onClose to wire
the close button.
Exports
window(title, children, opts?) -> Node— returns the window widget node. Module returns the builder function directly.
Types:
WindowOpts = { id?, movable?, resizable?, closable?, pos?, onClose?, props?, style? }
Usage
local window = require("@builtin::modules.zui.widget.window")
window("Inspector", { body }, {
movable = true,
closable = true,
onClose = "inspector:close",
})
Notes
- Signature is
window(title, children, opts); the olderwindow(children, opts)shape now warns loudly vialog.warninstead of falling back silently to the default"Window"header (closes #2342). - The decoder also accepts the raw form
{ type = "window", title = "...", children = {...} };titleis promoted intoprops.titleautomatically. posis only honored on first frame — subsequent renders preserve the user's drag position so callers never fight egui for window placement.