Skip to content

egui: pass records and replay - #44

Open
aiongg wants to merge 22 commits into
storytold:craft/0.37-pinfrom
aiongg:next-pass-records
Open

aiongg wants to merge 22 commits into
storytold:craft/0.37-pinfrom
aiongg:next-pass-records

Conversation

@aiongg

@aiongg aiongg commented Nov 14, 2026

Copy link
Copy Markdown

Builds on #43 (which builds on #42 and #41); review only the commits after it.

  • IdTypeMap::insert_temp_boxed keeps the allocation of a value taken out with remove_temp_raw.
  • Context::ptr_eq.
  • Context::pass_mark, pass_records_since and replay_pass_records: record the shapes, widget rects and AccessKit nodes one part of a pass added, and replay them in a later pass.

Behaviour changes

None; all items are new API.

Tests

None of these three commits adds a test.

PATCHES.md: no row.

These commits are on next, which craft-libs next pins.

@aiongg aiongg added the egui label Nov 14, 2026
`Ui::interact_opt` registers the widget as enabled only if both the `Ui`
and `InteractOptions::enabled` are. A widget can then draw its own
disabled look without a disabled child `Ui`, which would fade its
painter, add a node to the accessibility tree and shift the auto-ids of
the widgets after it.
Requests focus together with the event filter the widget keeps while
focused. `set_focus_lock_filter` only applies once the widget had focus
for a pass, so a widget that moves focus to a sibling on an arrow key
(a radio group) lost it to egui's directional focus when a second arrow
key came in the pass right after the request.
Enter and Space both act as a click on a focused widget. With
`activate_on_space: false`, only Enter does, as for a link: Space
doesn't activate a link, it scrolls the page in a browser. Defaults to
true, which keeps the current behaviour.
…s nest, and a listed layer moves with its whole sublayer tree

Popup::show makes its area a sublayer of the layer it opened from when both share an Order (tooltips aside). Areas::end_pass follows each layer with its whole sublayer tree, depth first, and set_layer_order moves a listed layer with all of its unlisted descendants.
Add ScrollArea::horizontal_scroll_bar_label and vertical_scroll_bar_label.
The scroll bar AccessKit node had no name, which fails WCAG 4.1.2. The
labels are per axis because a name cannot be composed from a shared
string in every language, and egui has no built-in UI text.
A part of a pass can be recorded (its shapes, widget rects and AccessKit
nodes) and added again in a later pass in place of running it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant