fix(combat): charge power bar from speed

Read the authored meter direction instead of inferring it from the combat element id, so the bright charge texture grows left-to-right from Speed. Keep the user-approved dark-red middle baseline visible independently and record its exact retail Recklessness visibility edge.

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

View file

@ -485,6 +485,10 @@ public class DatWidgetFactoryTests
Height = 14,
Children = [fill, range],
};
var meterState = new UiStateInfo { Id = UiStateInfo.DirectStateId };
meterState.Properties.Values[0x6Fu] = new UiPropertyValue
{ Kind = UiPropertyKind.Enum, UnsignedValue = 1u };
meter.States[UiStateInfo.DirectStateId] = meterState;
var info = new ElementInfo
{
Id = CombatUiController.PowerControlId,
@ -502,7 +506,7 @@ public class DatWidgetFactoryTests
Assert.Equal(0x06001923u, bar.ThumbSprite);
Assert.Equal(0x06001200u, bar.ScalarFillSprite);
Assert.Equal(0x0600715Eu, bar.ScalarRangeSprite);
Assert.True(bar.ScalarFillFromRight);
Assert.False(bar.ScalarFillFromRight);
}
private static ElementInfo TextInfo(params (uint Id, UiPropertyValue Value)[] properties)