What happened to node this frame.
- ui: the UI the node belongs to.
- node: the node to look up.
ui := headless(.{ width = 320, height = 200 });
defer free_ui(*ui);
count := 0;
build := (n: *int) {
for column(.{ gap = 8, padding = 16 }) {
label(tprint("Clicked % times", n.*));
if button("Add") n.* += 1;
}
};
frame(*ui, *count, build);
events := events_of(*ui, find_label(*ui, "Add"));
assert(!events.clicked);events_of :: (ui: *UI_State, node: *Node) -> Node_Events
What happened to node this frame.
Parameters
Returns
ui := headless(.{ width = 320, height = 200 });
defer free_ui(*ui);
count := 0;
build := (n: *int) {
for column(.{ gap = 8, padding = 16 }) {
label(tprint("Clicked % times", n.*));
if button("Add") n.* += 1;
}
};
frame(*ui, *count, build);
events := events_of(*ui, find_label(*ui, "Add"));
assert(!events.clicked);