fix(ui): preserve cropped chat and button faces

This commit is contained in:
Erik 2026-07-10 18:11:14 +02:00
parent d825572e31
commit accacecafe
7 changed files with 168 additions and 8 deletions

View file

@ -86,6 +86,22 @@ public class UiButtonTests
Assert.Equal("LockedUI", b.ActiveState);
}
[Fact]
public void PropertyOnlyPressedState_PreservesDrawableNormalFace()
{
var info = ButtonInfo("Normal", "Highlight");
info.States[UiButtonStateMachine.NormalPressed] = new UiStateInfo
{
Id = UiButtonStateMachine.NormalPressed,
Name = "Normal_pressed",
};
var b = CreateButton(info);
b.OnEvent(new UiEvent(0, b, UiEventType.MouseDown, Data1: 5, Data2: 5));
Assert.Equal("Normal", b.ActiveState);
}
[Fact]
public void HotClick_FiresImmediatelyRepeatsAndSuppressesReleaseClick()
{