ludic.ui: ui_override(path, text), ui_override_clear(path | "") and ui_overridden(path) - a template's or a stylesheet's text given from outside, its component shown again with its state kept and its own text brought back when let go; lib_text answers a copy of the override, and the dev poll leaves an overridden component alone; examples/library/ui_override

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 22:48:48 +03:00
parent 9f07fc8a62
commit aad3f8ca27
8 changed files with 144 additions and 0 deletions

View file

@ -34,6 +34,8 @@ function ui_default_backend() -> UiBackend {
return UiRenderers[0].make()
}
export state UiState {
@max(64) ov_path: []string = new []string # override.ludic: paths a studio's text stands in for ...
@max(64) ov_text: []string = new []string # ... and the texts
@max(256) ph_keys: []string = new []string # held.ludic: elements a preview holds a pseudo-class on for ...
@max(256) ph_bits: []int = new []int # ... and which (hover 1, active 2, focus 4, focus-visible 8, checked 16, disabled 32)
@max(512) pl_pools: []UiPool = new []UiPool # pool.ludic: each screen's nodes and envs, used again