ludic.ui: a pooled node's reset lets go of its wrapped lines instead of clearing them - they are the memo's list (ly_wrap), shared by every node with that text, so a text that wraps vanished from the third frame on, in the game as in ui-preview; smoke.txt holds four frames of it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 20:17:39 +03:00
parent dd25267502
commit e84a59aeff
3 changed files with 28 additions and 2 deletions

View file

@ -55,7 +55,7 @@ export property UiNode {
z: int = 0
nowrap: bool = false # white-space: nowrap
ellipsis: bool = false # text-overflow: ellipsis
lines: []string = null # a wrapped text's lines
lines: []string = null # a wrapped text's lines: the memo's (ly_wrap), not the node's
none: Val = Value.null() # what ui_attr answers for an attribute it lacks: made with the node, read only
var_names: []string = null # its custom properties (--name), which its descendants inherit
var_vals: []string = null

View file

@ -2,7 +2,7 @@
function nd_reset_b(n: UiNode) -> void {
n.nowrap = false
n.ellipsis = false
if n.lines != null { List.clear(n.lines) }
n.lines = null # the memo's list (ly_wrap), shared by every node with that text: never cleared
if n.var_names != null { List.clear(n.var_names) }
if n.var_vals != null { List.clear(n.var_vals) }
n.fg = -1