fix(combat): resolve power spans after layout

Derive the dark middle range from live post-anchor sibling geometry instead of freezing the inherited 800-pixel prototype during controller binding. Render the user-directed bright desired-power band independently from the absolute bar-left edge to the green thumb center.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-12 21:49:17 +02:00
parent 707add8539
commit f8c174d707
8 changed files with 129 additions and 24 deletions

View file

@ -185,10 +185,11 @@ The three visual layers remain separate. The gray scrollbar track spans the
whole authored control. Retail skill-gates element `0x100005EF` to Recklessness
advancement class `Trained` or higher when scalar message `0x0A` is received.
Per the connected visual gate, acdream uses that dark-red media as the always-
visible middle baseline (intentional divergence IA-20); the remaining exact
skill-gated treatment stays in AP-112. The meter fill is driven independently
by `RecvNotice_SetPowerbarLevel`, while the green thumb is driven by
`RecvNotice_DesiredAttackPowerChanged`.
visible middle baseline and renders the bright texture as a desired-power band
from the absolute left edge to the green thumb (intentional divergence IA-20);
the remaining exact skill-gated treatment stays in AP-112. Retail instead drives
the meter child independently through `RecvNotice_SetPowerbarLevel`, while the
green thumb is driven by `RecvNotice_DesiredAttackPowerChanged`.
The meter authors attribute `0x6F = 1`. `UIElement_Meter` constructor and
`DrawChildren @ 0x0046FBD0` make direction 1 the forward horizontal clip, so
@ -202,3 +203,12 @@ behind both captions. Speed's raw property `0x14` value is `2`, which is left
justification: `UIElement_Text::CalcJustification @ 0x00467260` centers only
value `1`, right-aligns values `3` and `5`, and treats every other value as left.
Power uses right justification.
The combat subtree inherits from an 800-pixel prototype and reflows into its
610-pixel mounted root on the first layout traversal. Therefore the controller
must not snapshot sibling positions during `Bind`: before reflow the bar is
`x=8,w=707` and Power is `x=611`; after retail anchoring they are `x=8,w=507`
and `x=411`. `ScalarRangeProvider` reads the live sibling rectangles during
drawing, producing the centered local interval `x=104,w=299`. Freezing the
pre-reflow width clamps that range to the bar's right edge and visibly shifts
the dark texture toward Power.