From 4585a122594c8bd2f0d24525f6d4325ceb1a47a6 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 16 Aug 2026 17:43:01 +0700 Subject: [PATCH] the same-continent teleport fall is found and fixed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - a teleport between cities on one continent could release you before the destination had streamed in and drop you under the map — the residency publish now waits for the snap and names the tile its facts are about, so the loading screen provably holds until the ground is real - nameplates stop jittering: plates of units you cannot see no longer shove the visible ones around, and the snap rides the correct pixel grid - unit-name text takes its first fix — a string fits the width its own measure reported, and a re-bake reaches the screen - books and plaques render through a real SimpleHTML widget inside a real ScrollFrame — strict parse, per-element fonts, block layout, and a scroll range measured from the whole subtree Co-Authored-By: Claude Fable 5 --- .../benilla-app/assets/ui/ItemTextFrame.xml | 63 +- crates/benilla-app/src/capture/probe_book.rs | 89 +- crates/benilla-app/src/capture/probes/act.rs | 20 + crates/benilla-app/src/nameplates.rs | 146 ++- crates/benilla-app/src/player.rs | 10 + crates/benilla-app/src/player/world_focus.rs | 65 +- .../benilla-app/src/ui_script/extract/mod.rs | 34 +- crates/benilla-app/src/ui_text/layout/mod.rs | 158 +++- crates/benilla-app/src/vplates.rs | 155 ++- crates/benilla-app/tests/item_text_frame.rs | 110 ++- crates/benilla-app/tests/world_api_wall.rs | 13 +- crates/benilla-ui/src/loader/mod.rs | 1 + crates/benilla-ui/src/loader/regions.rs | 12 +- crates/benilla-ui/src/loader/tests.rs | 104 ++ crates/benilla-ui/src/loader/widgets.rs | 128 ++- crates/benilla-ui/src/script/mod.rs | 8 +- crates/benilla-ui/src/script/model.rs | 10 +- crates/benilla-ui/src/script/object.rs | 1 + crates/benilla-ui/src/script/scrollframe.rs | 75 +- .../benilla-ui/src/script/simplehtml/mod.rs | 889 ++++++++++++++++++ .../benilla-ui/src/script/simplehtml/parse.rs | 716 ++++++++++++++ .../src/script/tests/create_frame_template.rs | 60 ++ crates/benilla-ui/src/script/tests/mod.rs | 1 + .../benilla-ui/src/script/tests/simplehtml.rs | 843 +++++++++++++++++ crates/benilla-ui/src/widget/mod.rs | 31 + crates/benilla-world/src/modkeys.rs | 55 +- crates/benilla-world/src/terrain_stream.rs | 19 +- 27 files changed, 3714 insertions(+), 102 deletions(-) create mode 100644 crates/benilla-ui/src/script/simplehtml/mod.rs create mode 100644 crates/benilla-ui/src/script/simplehtml/parse.rs create mode 100644 crates/benilla-ui/src/script/tests/simplehtml.rs diff --git a/crates/benilla-app/assets/ui/ItemTextFrame.xml b/crates/benilla-app/assets/ui/ItemTextFrame.xml index ae267726..6906cca7 100644 --- a/crates/benilla-app/assets/ui/ItemTextFrame.xml +++ b/crates/benilla-app/assets/ui/ItemTextFrame.xml @@ -9,15 +9,11 @@ ITEM_TEXT_BEGIN → ITEM_TEXT_READY → ITEM_TEXT_CLOSED. ADAPTATIONS (the MailFrame.xml precedents): - · The body scroll (ItemTextScrollFrame, UIPanelScrollFrameTemplate 280×355 at -66,-76) is - a plain Frame at that exact rect with the page FontString INSIDE it (no live scrollbar); - a very long page clips. The ref's own flanking scrollbar art (UI-Character-ScrollBar - top/bottom + the black middle strip) is quoted verbatim as inert layers, so the right - edge reads exactly like the reference at rest. - · ItemTextPageText is SimpleHTML in the ref — drawn here as a FontString at the same - rect (our letters/pages are plain text; an HTML page renders as its markup, accepted). - · The ScrollFrame-only verbs the reference's OnLoad/READY use (UpdateScrollChildRect, - ScrollBar SetValue/Hide, scrollBarHideable) are dropped with the live scrollbar. + · The body scroll and the page are the REFERENCE's own structure since decisions + 1337/1338 (B240): a real ScrollFrame over a 10x10 scroll child holding a real + SimpleHTML. Before those, the scroll was a plain Frame with an inert bar and the page a + FontString — so an HTML body drew as its own markup and a long one was cut off with + "...", both of which Goudy reported. · The two material colour TABLES are the reference's data (its Fonts.xml), quoted verbatim — the numbers ARE the look. They live here Benilla-scoped (the MoneyInput-shim precedent) because our own Fonts.xml deliberately doesn't ship the reference's two @@ -166,6 +162,10 @@ end ItemTextPageText:SetText(body) ItemTextScrollFrame:Show() + -- A page is content the reader has never seen: re-measure what there is to scroll and + -- start at the top, or page two opens halfway down page one. + ItemTextScrollFrame:UpdateScrollChildRect() + ItemTextScrollFrameScrollBar:SetValue(0) local pageNumber = ItemTextGetPage() local hasNext = ItemTextHasNextPage() @@ -275,9 +275,11 @@ - - + +