ludic.ui: no number made text to be read back - a style handler returns before any text for a key not its own, grow/alpha/animations/scroll read numbers as numbers, el_secs split once per text, a tooltip translated when its title changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 10:43:44 +03:00
parent 5f2900ffda
commit 706c7abc55
9 changed files with 39 additions and 9 deletions

View file

@ -17,11 +17,16 @@ function tt_track(ui_st: mut UiState, root: UiNode, x: float, y: float) -> void
ui_st.tt_key = ""
return
}
let title = ui_attr_text(n, "title")
if n.key != ui_st.tt_key {
ui_st.tt_key = n.key
ui_st.tt_since = an_now(ui_st)
ui_st.tt_src = null
}
if ui_st.tt_src == null or title != ui_st.tt_src { # translated when the element or its title changes, not a frame
ui_st.tt_src = title
ui_st.tt_text = tt_translate(ui_st, n, title)
}
ui_st.tt_text = tt_translate(ui_st, n, ui_attr_text(n, "title"))
ui_st.tt_x = px
ui_st.tt_y = py
}