Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofmodule widget.module·originates fromworld 07158574-5…

area

Free-positioned area. Root-only — must be the top-level widget of its registered screen. The `pos` field is at the widget root level (not inside `props`) because that's what the engine's `area` decoder expects. Pass `movable = true` to let the user drag the area; the dragged posi…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 2mo ago
What it does

area

Free-positioned area. Root-only — must be the top-level widget of its registered screen. The pos field is at the widget root level (not inside props) because that's what the engine's area decoder expects. Pass movable = true to let the user drag the area; the dragged position is held in egui's persistent memory.

Exports

This module returns the widget factory directly. There is no returned table.

  • area(children: { Node }?, opts: AreaOpts?) -> Node — build a free-positioned area node.

Types:

  • Pos = { number } — { x, y } in screen pixels.
  • Pivot = string — engine-defined anchor name ("center", "topleft", ...).
  • Node = { [string]: any } — opaque widget node.
  • AreaOpts = { id: string?, pos: Pos?, pivot: Pivot?, movable: boolean?, interactable: boolean?, style: { [string]: any }? }

Usage

local area = require("@builtin::modules.zui.widget.area")

local hud = area({
    Z.btn("Drag me"),
}, {
    pos = { 100, 100 },
    movable = true,
    interactable = true,
})
ui.registerScreen("draggable", hud)

Notes

  • The widget MUST be the top-level node of its registered screen.
  • pos, pivot, movable, interactable, style are written at the widget root level (NOT inside props) — the engine's area decoder reads them from there.
  • Lua-side read-back of dragged position for movable areas is a planned Rust extension; today the dragged position is held in egui's persistent memory and is not exposed back to Luau.
  • Each nil field is omitted from the resulting node so the engine sees only the fields the caller explicitly set.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

ZuiArea Module Free-positioned area. Root-only — must be the top-level widget of its registered screen. The `pos` field is at the widget root level (not inside `props`) because that's what the engine's `area` decoder expects. Pass `movable = true` to let the user drag the area; the dragged position is read back with `ui.getAreaPos(id)`. Pass `resizable = true` to add a bottom-right drag grip that resizes the area; the dragged size is read back with `ui.getAreaSize(id)`. Consumers: local area = require("modules.deprecated.zui.widget.area") area({ Z.btn("Drag me") }, { pos = { 100, 100 }, movable = true })

areaWidget(children: { Node }?, opts: AreaOpts?) → Node

Free-positioned area widget. Root-only — must be the top-level node of its registered screen. The `pos` field sits at the widget root level (not inside `props`) because that's what the engine's `area` decoder expects.

argtypedescription
children{ Node }?Child widget array.
optsAreaOpts?Optional `{ id, pos, pivot, movable, resizable, interactable, style }`.

examples

area({ Z.btn("Drag") }, { pos = { 100, 100 }, movable = true })
⌬ Types
Pos = { number } -- `{ x, y }` screen pixels.Pivot = string -- e.g. "center", "topleft" — engine-defined.Node = { [string]: any }AreaOpts = {

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

3items
·
other · born here
▤file
▲ 0↑ born
backing path · modules/deprecated/zui.module/widget.module/area.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.