From 39066900773e7857faf2d02e7ed51b71d219d97d Mon Sep 17 00:00:00 2001 From: godosa Date: Tue, 6 Oct 2026 23:39:36 +0200 Subject: godosa-engine: initial public history --- src/Godosa.Desktop/PadNavigator.cs | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/Godosa.Desktop/PadNavigator.cs (limited to 'src/Godosa.Desktop/PadNavigator.cs') diff --git a/src/Godosa.Desktop/PadNavigator.cs b/src/Godosa.Desktop/PadNavigator.cs new file mode 100644 index 0000000..b4b59d5 --- /dev/null +++ b/src/Godosa.Desktop/PadNavigator.cs @@ -0,0 +1,85 @@ +using System.Collections.Generic; +using System.Linq; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.VisualTree; +using Avalonia.Media; +using Godosa.Core.Input; + +namespace Godosa.Desktop; + +/// Gamepad control of an open window: D-pad moves a highlight through its enabled +/// buttons (wrapping), A presses (the game decides B/Start). +public sealed class PadNavigator +{ + private static readonly Thickness HighlightThickness = new(2); + private readonly MenuCursor _cursor = new(); + private readonly List