feat(combat): port retail basic combat bar
Mount authored gmCombatUI, share one press/hold/release request state machine across DAT buttons and keybindings, and recover the exact 1.0s/0.8s power timing from matching retail x86. The same timer fixes jump charge, while ready-stance, response queueing, auto-repeat, layout binding, migration, and conformance coverage keep behavior architectural rather than panel-local. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
9958458318
commit
2215c76c7e
22 changed files with 1265 additions and 46 deletions
|
|
@ -30,6 +30,24 @@ public class UiButtonTests
|
|||
Assert.Equal((17, 9), clicked);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PointerDownAndUp_InvokeDistinctTransitionHandlers()
|
||||
{
|
||||
var transitions = new List<string>();
|
||||
var b = new UiButton(new ElementInfo { Type = 1, Width = 20, Height = 20 }, NoTex)
|
||||
{
|
||||
Width = 20,
|
||||
Height = 20,
|
||||
OnPressed = () => transitions.Add("pressed"),
|
||||
OnReleased = () => transitions.Add("released"),
|
||||
};
|
||||
|
||||
b.OnEvent(new UiEvent(0, b, UiEventType.MouseDown, Data1: 5, Data2: 5));
|
||||
b.OnEvent(new UiEvent(0, b, UiEventType.MouseUp, Data1: 30, Data2: 30));
|
||||
|
||||
Assert.Equal(["pressed", "released"], transitions);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NotClickThrough_SoItReceivesClicks()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue