Menu: stylus sticks out of the hand front and matches the touch point; haptic ticks for hover, release, sliders, scrolling
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f2fcd0aa2
commit
d0b50fbc41
6 files changed
+95
-6
No files matched your search
@@ -17,7 +17,7 @@ public partial class MenuSpike : Node3D
|
||||
private MenuScreen _screen;
|
||||
private MainMenu _menu;
|
||||
private readonly MenuScreen.PointerInput[] _inputs = new MenuScreen.PointerInput[2];
|
||||
private int _spawn, _reset, _ping, _close, _clicks, _pressedEvents;
|
||||
private int _spawn, _reset, _ping, _close, _clicks, _pressedEvents, _hapticTicks;
|
||||
private bool _allPass = true;
|
||||
|
||||
public override void _Ready()
|
||||
@@ -32,6 +32,7 @@ public partial class MenuSpike : Node3D
|
||||
_screen.SetContent(_menu);
|
||||
_screen.SetActive(true);
|
||||
_screen.PointerPressed += (_, _) => _pressedEvents++;
|
||||
_screen.Haptic += (_, _, _) => _hapticTicks++;
|
||||
_menu.ReturnToSpawnRequested += () => _spawn++;
|
||||
_menu.ResetPropsRequested += () => _reset++;
|
||||
_menu.PingRequested += () => _ping++;
|
||||
@@ -305,6 +306,7 @@ public partial class MenuSpike : Node3D
|
||||
await TouchPress(1, Center(_menu.HeaderCloseButton));
|
||||
Check("touch: Close fired once", _close == 1, $"(count={_close})");
|
||||
Check("click feedback fired", _clicks >= 8, $"(clicks={_clicks})");
|
||||
Check("haptic ticks fired (hover/release/detents)", _hapticTicks >= 30, $"(ticks={_hapticTicks})");
|
||||
|
||||
GD.Print($"MENU: overall {(_allPass ? "PASS" : "FAIL")}");
|
||||
GetTree().Quit(_allPass ? 0 : 1);
|
||||
|
||||
Reference in new issue
Block a user