ludic.ui, ludic.i18n: frame_allocs to 0 - a wrap, an ellipsis, a tooltip's lines, a text-shadow's colour and a range's value kept by what made them; pointer events from a ring; inline text joined through the memo; the pool's and the state's lists through ui_kept; parse, memo miss, pool miss, lazy start and template errors declared; the translation cache clears in place

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 16:41:47 +03:00
parent 629579123a
commit 429e419327
71 changed files with 365 additions and 155 deletions

View file

@ -15,6 +15,7 @@ function cv_tpl(ui_st: mut UiState, s: string) -> UiVarTpl {
if j >= 0 { m.vtpls[j] = t }
return t
}
@alloc_ok("a memo miss (cv_tpl): once per value with var() in it")
function cv_parse(ui_st: mut UiState, s: string) -> UiVarTpl {
let t = new UiVarTpl
t.lits = new []string
@ -49,10 +50,10 @@ function cv_pieces(ui_st: mut UiState, n: UiNode, s: string) -> bool {
let t = cv_tpl(ui_st, s)
List.clear(ui_st.cv_texts)
for k in 0 .. len(t.names) {
push(ui_st.cv_texts, t.lits[k])
push(ui_st.cv_texts, cv_value(ui_st, n, t, k))
ui_kept(ui_st.cv_texts, t.lits[k])
ui_kept(ui_st.cv_texts, cv_value(ui_st, n, t, k))
}
push(ui_st.cv_texts, t.lits[len(t.names)])
ui_kept(ui_st.cv_texts, t.lits[len(t.names)])
return true
}
function cv_has(s: string) -> bool {
@ -65,6 +66,7 @@ function cv_value(ui_st: mut UiState, n: UiNode, t: UiVarTpl, k: int) -> string
let v = cs_var(n, t.names[k])
if v != null { return v }
if t.falls[k] != null { return t.falls[k] }
@alloc_ok("only when a template is wrong: a broken screen, never a working one")
ui_err(ui_st, `var({t.names[k]}): no element here or above sets it`)
return ""
}