Preserve the authored gray track, trained-Recklessness range, live bright charge meter, and independent desired-power thumb while keeping Speed and Power over gray side regions. Correct retail text justification value 2 to left alignment and retain direct RenderSurface decoding in the texture inspection tool used to verify the assets. Co-Authored-By: Codex <codex@openai.com>
45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
using AcDream.App.UI;
|
|
using AcDream.App.UI.Layout;
|
|
|
|
namespace AcDream.App.Tests.UI.Layout;
|
|
|
|
public sealed class CombatLayoutConformanceTests
|
|
{
|
|
[Theory]
|
|
[InlineData("ID_CombatPanelOption_AutoRepeatAttack", 0x0718F89Bu)]
|
|
[InlineData("ID_CombatPanelOption_AutoTarget", 0x0FB7B944u)]
|
|
[InlineData("ID_CombatPanelOption_ViewCombatTarget", 0x0936C254u)]
|
|
public void RetailStringHash_MatchesNamedDecompGolden(string value, uint expected)
|
|
=> Assert.Equal(expected, DatStringResolver.ComputeHash(value));
|
|
|
|
[Fact]
|
|
public void RetailFixture_UsesAuthoredScrollbarRolesAndCheckboxWidgets()
|
|
{
|
|
ElementInfo info = FixtureLoader.LoadCombatInfos();
|
|
ImportedLayout layout = LayoutImporter.Build(
|
|
info,
|
|
_ => (0u, 0, 0),
|
|
datFont: null,
|
|
stringResolve: _ => "localized");
|
|
|
|
var power = Assert.IsType<UiScrollbar>(
|
|
layout.FindElement(CombatUiController.PowerControlId));
|
|
Assert.Equal(0x060074CAu, power.TrackSprite);
|
|
Assert.Equal(0x06001923u, power.ThumbSprite);
|
|
Assert.Equal(0x06001200u, power.ScalarFillSprite);
|
|
Assert.Equal(0x0600715Eu, power.ScalarRangeSprite);
|
|
Assert.True(power.ScalarFillFromRight);
|
|
|
|
var repeat = Assert.IsType<UiButton>(
|
|
layout.FindElement(CombatUiController.RepeatAttacksId));
|
|
Assert.Equal(13f, repeat.FaceWidth);
|
|
Assert.Equal(13f, repeat.FaceHeight);
|
|
Assert.Equal(17f, repeat.LabelOffsetX);
|
|
Assert.True(repeat.ToggleBehavior);
|
|
|
|
var high = Assert.IsType<UiButton>(
|
|
layout.FindElement(CombatUiController.HighButtonId));
|
|
Assert.Equal("localized", high.Label);
|
|
Assert.IsType<UiText>(layout.FindElement(CombatUiController.SpeedLabelId));
|
|
}
|
|
}
|