feat(D.2b): per-container capacity bar on inventory cells

Faithful port of retail UIElement_UIItem::UpdateCapacityDisplay (0x004e16e0):
each container cell (side bags + main pack) shows a vertical UIElement_Meter
(element 0x10000347, back 0x06004D22 / fill 0x06004D23) filled to
GetNumContainedItems / ItemsCapacity, clamped [0,1]; hidden for non-containers
(CapacityFill=-1). Drawn procedurally on UiItemSlot like the triangle/square
overlays (back full + front clipped bottom-up). Right-anchored flush to the cell
edge (visual gate: the dat X=26 sat ~5px off the right edge). Visually confirmed
2026-06-22. Divergence AP-59; polish deferred to ISSUES #146 (exact rect/anchor,
fill direction vs m_eDirection 0x6f, closed-bag lazy-load).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-22 15:54:54 +02:00
parent 077586a0f0
commit a45c421bd1
6 changed files with 112 additions and 1 deletions

View file

@ -46,6 +46,32 @@ Copy this block when adding a new issue:
---
## #146 — D.2b inventory capacity-bar visual polish
**Status:** OPEN
**Severity:** LOW
**Filed:** 2026-06-22
The per-side-bag / main-pack container **capacity fill bar** (faithful port of retail
`UIElement_UIItem::UpdateCapacityDisplay 0x004e16e0`, element `0x10000347`) shipped + is
visually confirmed (`src/AcDream.App/UI/UiItemSlot.cs` `CapacityFill`;
`InventoryController.SetCapacityBar`). User: "looks good, we need to polish it a bit, but lets do
that later." Get the specific polish list from the user when picked up. Candidate points (confirm
against retail):
- **Exact bar rect / anchor** — currently right-anchored flush (`X = Width barW`); the dat element
rect is `X=26 Y=1 W=5 H=30` (a 5px right margin). Flush was the visual-gate call; reconcile with
the dat once the desired look is pinned.
- **Fill direction** — currently bottom-up (assumed); the dat `m_eDirection` (property `0x6f`) isn't
read (cf. AP-50). Confirm bottom-up vs retail.
- **Closed-bag fill** — a closed side bag reads empty until opened (contents aren't indexed until
`ViewContents`). If retail shows real fill for closed bags, the per-container item counts must be
pre-loaded at login (the lazy-load question — also the container-switching "open verification").
See divergence register **AP-59**.
---
## #145 — Inventory window panels occluded by the full-window backdrop (importer ignores ZLevel)
**Status:** DONE (2026-06-21 · `45a5cc5` + continuation `417b137`) — VISUALLY CONFIRMED. The first fix (`45a5cc5`) folded `ZLevel` into `ZOrder` and put the backdrop behind the **ZLevel-0 top-level** panels, which made the **paperdoll** (its base root is ZLevel 0) render — so it *looked* done. But the **mounted backpack/3D-items panels** inherited their sub-window root's **ZLevel 1000** (via `ElementReader.Merge`'s zero-wins-base rule), so the `ReadOrder ZLevel·10000` fold sank them to ZOrder ≈ 10,000,000 — *behind* the backdrop (ZLevel 100 → ≈ 1,000,000). The Alphablend backdrop then **washed out** the backpack/3D-items captions + burden meter + item cells (only the bright paperdoll survived the wash). Surfaced once B-Controller populated those panels. Continuation fix `417b137`: the sub-window mount keeps each slot's **own** frame ZLevel (not the base root's 1000), so panels sit in front of the backdrop. Confirmed live (Burden 17% + vertical bar + "Contents of Backpack" + full item grid all render on the dark backdrop). Locked by `InventoryFrameImportProbe` (real-dat: each mounted panel's ZOrder > the backdrop's). DO-NOT-RETRY: a mounted sub-window slot must NOT inherit the base layout root's ZLevel. Per-slot paperdoll silhouettes (generic `UiDatElement` sprite — need `0x10000032` UiItemSlot + per-slot art) → Sub-phase C.