diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 7523fd97fd..84d9f76619 100644 --- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -1174,6 +1174,7 @@ + diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs new file mode 100644 index 0000000000..17d90b0d31 --- /dev/null +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs @@ -0,0 +1,88 @@ +using System.Collections.Generic; +using System.Drawing; + +using BizHawk.Emulation.Common; + +namespace BizHawk.Client.EmuHawk +{ + [Schema("SGB")] + public class SGBSchema : IVirtualPadSchema + { + public IEnumerable GetPadSchemas(IEmulator core) + { + yield return StandardController(1); + } + + private static PadSchema StandardController(int controllerNum) + { + return new PadSchema + { + IsConsole = false, + DefaultSize = new Size(174, 79), + Buttons = new[] + { + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} Up", + DisplayName = "", + Icon = Properties.Resources.BlueUp, + Location = new Point(14, 12), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} Down", + DisplayName = "", + Icon = Properties.Resources.BlueDown, + Location = new Point(14, 56), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} Left", + DisplayName = "", + Icon = Properties.Resources.Back, + Location = new Point(2, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} Right", + DisplayName = "", + Icon = Properties.Resources.Forward, + Location = new Point(24, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} B", + DisplayName = "B", + Location = new Point(122, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} A", + DisplayName = "A", + Location = new Point(146, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} Select", + DisplayName = "s", + Location = new Point(52, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = $"P{controllerNum} Start", + DisplayName = "S", + Location = new Point(74, 34), + Type = PadSchema.PadInputType.Boolean + } + } + }; + } + } +}