ludic.ui: a scroll box without scroll-top asks ui_attr_has first - ui_attr's miss made a new null every frame on every screen that scrolls (the gate's one kept block a frame on map, shop, journal and craft)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 18:26:46 +03:00
parent 4e0c30488f
commit ab6b666fd6
2 changed files with 13 additions and 2 deletions

View file

@ -25,7 +25,9 @@ function sc_held(ui_st: mut UiState, n: UiNode, off: float, live: bool) -> float
List.pop(pxs)
}
}
let v = ui_attr(n, "scroll-top")
if Value.kind(v) != 0 { at = ui_px(ui_st, el_numv(ui_st, v)) }
if ui_attr_has(n, "scroll-top") {
let v = ui_attr(n, "scroll-top")
if Value.kind(v) != 0 { at = ui_px(ui_st, el_numv(ui_st, v)) }
}
return at
}