docs: file #150 — thread Fix C per-element dat-font resolver into GameWindow's 4 import sites
Follow-up to Fix C (a0d3395): the per-element FontDid resolver is studio-only; GameWindow
passes null. Captured the turnkey fix (ConcurrentDictionary + GetOrAdd closure over UiDatFont.Load,
mirroring RenderStack.ResolveDatFont) + the 4 import sites + the CharacterStatController auto-benefit note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
26d5c101e4
commit
ed626f4250
1 changed files with 21 additions and 0 deletions
|
|
@ -46,6 +46,27 @@ Copy this block when adding a new issue:
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## #150 — Live game (GameWindow) doesn't thread the per-element dat-font resolver (Fix C is studio-only)
|
||||||
|
|
||||||
|
**Status:** OPEN
|
||||||
|
**Severity:** LOW
|
||||||
|
**Filed:** 2026-06-26
|
||||||
|
**Component:** ui
|
||||||
|
|
||||||
|
**Description:** Fix C (commit `a0d3395`) added a per-element dat `FontDid` resolver to `LayoutImporter.Import` + `DatWidgetFactory` — each text element gets ITS OWN dat font instead of one global font. It's wired into the STUDIO path (StudioWindow → LayoutSource → LayoutImporter), but GameWindow's four `LayoutImporter.Import`/`Build` calls explicitly pass `null`, so the LIVE game still uses a single global font and panels don't get per-element dat fonts.
|
||||||
|
|
||||||
|
**Fix:** Build a `Func<uint,UiDatFont?>` closure over a `ConcurrentDictionary<uint, UiDatFont?>` near where `vitalsDatFont`/`largeDatFont` load (~`GameWindow.cs:1820`), reusing `UiDatFont.Load` for any unknown id via `GetOrAdd` (same pattern as `RenderStack.ResolveDatFont`), and pass it to each of the four Import sites:
|
||||||
|
- vitals `0x2100006C` — ~`GameWindow.cs:1820-1835`
|
||||||
|
- chat — ~`GameWindow.cs:1875`
|
||||||
|
- toolbar `0x21000016` — ~`GameWindow.cs:2019`
|
||||||
|
- inventory `0x21000023` — ~`GameWindow.cs:2157`
|
||||||
|
|
||||||
|
**Note:** `CharacterStatController.Bind` (also called from GameWindow) already has the null-means-keep-dat-font semantics from Fix C, so it benefits automatically once GameWindow threads the resolver. Backward-compat: the resolver applies the dat font as a *default*; controllers that set `DatFont` explicitly still override, so existing live-game panels stay unchanged.
|
||||||
|
|
||||||
|
**Files:** `src/AcDream.App/Rendering/GameWindow.cs` (4 import sites), `src/AcDream.App/Rendering/RenderBootstrap.cs` (`RenderStack.ResolveDatFont` = the pattern to mirror).
|
||||||
|
|
||||||
|
**Relates to:** Fix C `a0d3395` (studio-path resolver); the importer dat-fidelity work (Fix A/B/C, this session).
|
||||||
|
|
||||||
## #149 — Studio: inventory window (0x21000023) renders all-black in preview
|
## #149 — Studio: inventory window (0x21000023) renders all-black in preview
|
||||||
|
|
||||||
**Status:** OPEN
|
**Status:** OPEN
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue