A container whose children overlap, each filling it (or placed by align).
- style: layout and paint options for the container.
- loc: the call site. It identifies the widget from one frame to the next, so leave the default.
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
for stack() {
label("under");
label("over");
}
});
assert(find_label(*ui, "under").rect.y == find_label(*ui, "over").rect.y);stack :: (style: Style = .{}, loc := #caller_location) -> Container
A container whose children overlap, each filling it (or placed by align).
Parameters
- style: Style = .{}
- layout and paint options for the container.
- loc := #caller_location
- the call site. It identifies the widget from one frame to the next, so leave the default.
Returns
ui := headless();
defer free_ui(*ui);
frame(*ui, *ui, (u: *UI_State) {
for stack() {
label("under");
label("over");
}
});
assert(find_label(*ui, "under").rect.y == find_label(*ui, "over").rect.y);