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

@ -47,8 +47,8 @@ function tt_draw(ui_st: mut UiState, root: UiNode) -> void {
let n = ct_part(ui_st, root, "ui-tooltip", "")
n.tag = "div"
n.parent = root
let lines = tt_lines(ui_st.tt_text)
for i in 0 .. len(lines) { push(n.children, ct_part(ui_st, root, "ui-tooltip-text", lines[i])) }
let lines = tt_lines(ui_st, ui_st.tt_text)
for i in 0 .. len(lines) { ui_kept(n.children, ct_part(ui_st, root, "ui-tooltip-text", lines[i])) }
cs_tree(ui_st, n)
ly_measure(ui_st, n, ui_st.ly_vp_w * 0.4, ui_px(ui_st, 16.0), root.rfg)
let x = Math.min(ui_st.tt_x + ui_px(ui_st, 16.0), ui_st.ly_vp_x + ui_st.ly_vp_w - n.mw)
@ -57,7 +57,8 @@ function tt_draw(ui_st: mut UiState, root: UiNode) -> void {
fr_draw(ui_st, n)
}
# a title's lines: apart at a newline, or at a written \n (which an attribute cannot hold otherwise)
function tt_lines(s: string) -> []string {
@alloc_ok("a memo miss: once per title (memo_more.ludic), bounded by MM_CAP")
function tt_lines_new(s: string) -> []string {
let out = new []string
var at = 0
var i = 0