From 554e0dcf806daa2a260a7a744e44396d39fa0397 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 22 Mar 2020 15:09:19 -0500 Subject: [PATCH] ButtonSchema - simplify more --- .../tools/VirtualPads/schema/ButtonSchema.cs | 1 + .../tools/VirtualPads/schema/ColecoSchema.cs | 150 +++--------- .../tools/VirtualPads/schema/DualGBSchema.cs | 10 +- .../tools/VirtualPads/schema/GenSchema.cs | 118 ++-------- .../tools/VirtualPads/schema/NesSchema.cs | 216 ++++-------------- .../tools/VirtualPads/schema/O2Schema.cs | 3 - .../tools/VirtualPads/schema/PSXSchema.cs | 65 ++---- .../tools/VirtualPads/schema/PcfxSchema.cs | 38 +-- .../tools/VirtualPads/schema/SGBSchema.cs | 10 +- .../tools/VirtualPads/schema/SaturnSchema.cs | 159 +++---------- .../tools/VirtualPads/schema/SnesSchema.cs | 64 +----- .../VirtualPads/schema/WonderSwanSchema.cs | 106 ++------- 12 files changed, 180 insertions(+), 760 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ButtonSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ButtonSchema.cs index b1bae16f76..4b2b5b0866 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ButtonSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ButtonSchema.cs @@ -25,6 +25,7 @@ namespace BizHawk.Client.EmuHawk public ButtonSchema(int x, int y, int controller, string name) : this(x, y, $"P{controller} {name}") { + DisplayName = name; } public string Name { get; protected set; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs index 7c49a97163..9f0a377bdd 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs @@ -48,62 +48,20 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(50, 32, $"P{controller} Down"), ButtonSchema.Left(29, 22, $"P{controller} Left"), ButtonSchema.Right(71, 22, $"P{controller} Right"), - new ButtonSchema(3, 42, controller, "L") - { - DisplayName = "L" - }, - new ButtonSchema(100, 42, controller, "R") - { - DisplayName = "R" - }, - new ButtonSchema(27, 85, controller, "1") - { - DisplayName = "1" - }, - new ButtonSchema(50, 85, controller, "2") - { - DisplayName = "2" - }, - new ButtonSchema(73, 85, controller, "3") - { - DisplayName = "3" - }, - new ButtonSchema(27, 108, controller, "4") - { - DisplayName = "4" - }, - new ButtonSchema(50, 108, controller, "5") - { - DisplayName = "5" - }, - new ButtonSchema(73, 108, controller, "6") - { - DisplayName = "6" - }, - new ButtonSchema(27, 131, controller, "7") - { - DisplayName = "7" - }, - new ButtonSchema(50, 131, controller, "8") - { - DisplayName = "8" - }, - new ButtonSchema(73, 131, controller, "9") - { - DisplayName = "9" - }, - new ButtonSchema(27, 154, controller, "Star") - { - DisplayName = "*" - }, - new ButtonSchema(50, 154, controller, "0") - { - DisplayName = "0" - }, - new ButtonSchema(73, 154, controller, "Pound") - { - DisplayName = "#" - } + new ButtonSchema(3, 42, controller, "L"), + new ButtonSchema(100, 42, controller, "R"), + new ButtonSchema(27, 85, controller, "1"), + new ButtonSchema(50, 85, controller, "2"), + new ButtonSchema(73, 85, controller, "3"), + new ButtonSchema(27, 108, controller, "4"), + new ButtonSchema(50, 108, controller, "5"), + new ButtonSchema(73, 108, controller, "6"), + new ButtonSchema(27, 131, controller, "7"), + new ButtonSchema(50, 131, controller, "8"), + new ButtonSchema(73, 131, controller, "9"), + new ButtonSchema(27, 154, controller, "Star") { DisplayName = "*" }, + new ButtonSchema(50, 154, controller, "0"), + new ButtonSchema(73, 154, controller, "Pound") { DisplayName = "#" } } }; } @@ -140,55 +98,18 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(50, 32, $"P{controller} Down"), ButtonSchema.Left(29, 22, $"P{controller} Left"), ButtonSchema.Right(71, 22, $"P{controller} Right"), - new ButtonSchema(27, 85, controller, "1") - { - DisplayName = "1" - }, - new ButtonSchema(50, 85, controller, "2") - { - DisplayName = "2" - }, - new ButtonSchema(73, 85, controller, "3") - { - DisplayName = "3" - }, - new ButtonSchema(27, 108, controller, "4") - { - DisplayName = "4" - }, - new ButtonSchema(50, 108, controller, "5") - { - DisplayName = "5" - }, - new ButtonSchema(73, 108, controller, "6") - { - DisplayName = "6" - }, - new ButtonSchema(27, 131, controller, "7") - { - DisplayName = "7" - }, - new ButtonSchema(50, 131, controller, "8") - { - DisplayName = "8" - }, - new ButtonSchema(73, 131, controller, "9") - { - DisplayName = "9" - }, - new ButtonSchema(27, 154, controller, "Star") - { - DisplayName = "*" - }, - new ButtonSchema(50, 154, controller, "0") - { - DisplayName = "0" - }, - new ButtonSchema(73, 154, controller, "Pound") - { - DisplayName = "#" - }, - + new ButtonSchema(27, 85, controller, "1"), + new ButtonSchema(50, 85, controller, "2"), + new ButtonSchema(73, 85, controller, "3"), + new ButtonSchema(27, 108, controller, "4"), + new ButtonSchema(50, 108, controller, "5"), + new ButtonSchema(73, 108, controller, "6"), + new ButtonSchema(27, 131, controller, "7"), + new ButtonSchema(50, 131, controller, "8"), + new ButtonSchema(73, 131, controller, "9"), + new ButtonSchema(27, 154, controller, "Star") { DisplayName = "*" }, + new ButtonSchema(50, 154, controller, "0"), + new ButtonSchema(73, 154, controller, "Pound") { DisplayName = "#" }, new SingleFloatSchema(6, 200, $"P{controller} Disc X") { DisplayName = "Disc", @@ -196,23 +117,10 @@ namespace BizHawk.Client.EmuHawk MinValue = -360, MaxValue = 360 }, - - new ButtonSchema(126, 15, controller, "Yellow") - { - DisplayName = "Yellow" - }, - new ButtonSchema(126, 40, controller, "Red") - { - DisplayName = "Red" - }, - new ButtonSchema(126, 65, controller, "Purple") - { - DisplayName = "Purple" - }, + new ButtonSchema(126, 15, controller, "Yellow"), + new ButtonSchema(126, 40, controller, "Red"), + new ButtonSchema(126, 65, controller, "Purple"), new ButtonSchema(126, 90, controller, "Blue") - { - DisplayName = "Blue" - } } }; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs index a9e650ba44..8e9b5eaed1 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs @@ -26,14 +26,8 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(14, 56, $"P{controller} Down"), ButtonSchema.Left(2, 34, $"P{controller} Left"), ButtonSchema.Right(24, 34, $"P{controller} Right"), - new ButtonSchema(122, 34, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(146, 34, controller, "A") - { - DisplayName = "A" - }, + new ButtonSchema(122, 34, controller, "B"), + new ButtonSchema(146, 34, controller, "A"), new ButtonSchema(52, 34, controller, "Select") { DisplayName = "s" diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs index 8d676165b9..09af1627e3 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs @@ -77,22 +77,10 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(14, 56, $"P{controller} Down"), ButtonSchema.Left(2, 34, $"P{controller} Left"), ButtonSchema.Right(24, 34, $"P{controller} Right"), - new ButtonSchema(98, 40, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(122, 40, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(146, 40, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(122, 12, controller, "Start") - { - DisplayName = "S" - } + new ButtonSchema(98, 40, controller, "A"), + new ButtonSchema(122, 40, controller, "B"), + new ButtonSchema(146, 40, controller, "C"), + new ButtonSchema(122, 12, controller, "Start") { DisplayName = "S" } } }; } @@ -108,34 +96,13 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(14, 56, $"P{controller} Down"), ButtonSchema.Left(2, 34, $"P{controller} Left"), ButtonSchema.Right(24, 34, $"P{controller} Right"), - new ButtonSchema(98, 40, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(122, 40, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(146, 40, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(98, 65, controller, "X") - { - DisplayName = "X" - }, - new ButtonSchema(122, 65, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(146, 65, controller, "Z") - { - DisplayName = "Z" - }, - new ButtonSchema(122, 12, controller, "Start") - { - DisplayName = "S" - } + new ButtonSchema(98, 40, controller, "A"), + new ButtonSchema(122, 40, controller, "B"), + new ButtonSchema(146, 40, controller, "C"), + new ButtonSchema(98, 65, controller, "X"), + new ButtonSchema(122, 65, controller, "Y"), + new ButtonSchema(146, 65, controller, "Z"), + new ButtonSchema(122, 12, controller, "Start") { DisplayName = "S" } } }; } @@ -222,26 +189,11 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(47, 73, $"P{controller} Down"), ButtonSchema.Left(15, 43, $"P{controller} Left"), ButtonSchema.Right(80, 43, $"P{controller} Right"), - new ButtonSchema(70, 65, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(70, 20, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(22, 20, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(22, 65, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(47, 43, controller, "Start") - { - DisplayName = "S" - } + new ButtonSchema(70, 65, controller, "A"), + new ButtonSchema(70, 20, controller, "B"), + new ButtonSchema(22, 20, controller, "C"), + new ButtonSchema(22, 65, controller, "A"), + new ButtonSchema(47, 43, controller, "Start") { DisplayName = "S" } } }; } @@ -253,38 +205,14 @@ namespace BizHawk.Client.EmuHawk DefaultSize = new Size(174, 90), Buttons = new[] { - new ButtonSchema(98, 40, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(122, 40, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(146, 40, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(98, 65, controller, "D") - { - DisplayName = "D" - }, - new ButtonSchema(122, 65, controller, "E1") - { - DisplayName = "E¹" - }, - new ButtonSchema(152, 65, controller, "E2") - { - DisplayName = "E²" - }, - new ButtonSchema(122, 12, controller, "Start") - { - DisplayName = "Start" - }, + new ButtonSchema(98, 40, controller, "A"), + new ButtonSchema(122, 40, controller, "B"), + new ButtonSchema(146, 40, controller, "C"), + new ButtonSchema(98, 65, controller, "D"), + new ButtonSchema(122, 65, controller, "E1") { DisplayName = "E¹" }, + new ButtonSchema(152, 65, controller, "E2") { DisplayName = "E²" }, + new ButtonSchema(122, 12, controller, "Start"), new ButtonSchema(162, 12, controller, "Select") - { - DisplayName = "Select" - } } }; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs index 0b9acbe564..d128a32198 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs @@ -219,14 +219,8 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(23, 36, $"P{controller} Down"), ButtonSchema.Left(2, 24, $"P{controller} Left"), ButtonSchema.Right(44, 24, $"P{controller} Right"), - new ButtonSchema(124, 24, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(147, 24, controller, "A") - { - DisplayName = "A" - }, + new ButtonSchema(124, 24, controller, "B"), + new ButtonSchema(147, 24, controller, "A"), new ButtonSchema(72, 24, controller, "Select") { DisplayName = "s" @@ -253,14 +247,8 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(23, 36, $"P{controller} Down"), ButtonSchema.Left(2, 24, $"P{controller} Left"), ButtonSchema.Right(44, 24, $"P{controller} Right"), - new ButtonSchema(124, 24, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(147, 24, controller, "A") - { - DisplayName = "A" - }, + new ButtonSchema(124, 24, controller, "B"), + new ButtonSchema(147, 24, controller, "A"), new ButtonSchema(72, 24, controller, "Microphone") { DisplayName = "Mic" @@ -283,9 +271,6 @@ namespace BizHawk.Client.EmuHawk TargetSize = new Size(256, 240) }, new ButtonSchema(284, 17, controller, "Fire") - { - DisplayName = "Fire" - } } }; } @@ -306,9 +291,6 @@ namespace BizHawk.Client.EmuHawk MaxValue = 160 }, new ButtonSchema(14, 85, controller, "Fire") - { - DisplayName = "Fire" - } } }; } @@ -386,14 +368,8 @@ namespace BizHawk.Client.EmuHawk { TargetSize = new Size(256, 240) }, - new ButtonSchema(284, 17, controller, "Click") - { - DisplayName = "Click" - }, + new ButtonSchema(284, 17, controller, "Click"), new ButtonSchema(284, 48, controller, "Touch") - { - DisplayName = "Touch" - } } }; } @@ -438,46 +414,16 @@ namespace BizHawk.Client.EmuHawk { DisplayName = " F8 " }, - new ButtonSchema(36, 38, controller, "1") - { - DisplayName = "1" - }, - new ButtonSchema(60, 38, controller, "2") - { - DisplayName = "2" - }, - new ButtonSchema(84, 38, controller, "3") - { - DisplayName = "3" - }, - new ButtonSchema(108, 38, controller, "4") - { - DisplayName = "4" - }, - new ButtonSchema(132, 38, controller, "5") - { - DisplayName = "5" - }, - new ButtonSchema(156, 38, controller, "6") - { - DisplayName = "6" - }, - new ButtonSchema(180, 38, controller, "7") - { - DisplayName = "7" - }, - new ButtonSchema(204, 38, controller, "8") - { - DisplayName = "8" - }, - new ButtonSchema(228, 38, controller, "9") - { - DisplayName = "9" - }, - new ButtonSchema(252, 38, controller, "0") - { - DisplayName = "0" - }, + new ButtonSchema(36, 38, controller, "1"), + new ButtonSchema(60, 38, controller, "2"), + new ButtonSchema(84, 38, controller, "3"), + new ButtonSchema(108, 38, controller, "4"), + new ButtonSchema(132, 38, controller, "5"), + new ButtonSchema(156, 38, controller, "6"), + new ButtonSchema(180, 38, controller, "7"), + new ButtonSchema(204, 38, controller, "8"), + new ButtonSchema(228, 38, controller, "9"), + new ButtonSchema(252, 38, controller, "0"), new ButtonSchema(276, 38, controller, "Minus") { DisplayName = "-" @@ -498,46 +444,16 @@ namespace BizHawk.Client.EmuHawk { DisplayName = "ESC" }, - new ButtonSchema(54, 61, controller, "Q") - { - DisplayName = "Q" - }, - new ButtonSchema(80, 61, controller, "W") - { - DisplayName = "W" - }, - new ButtonSchema(108, 61, controller, "E") - { - DisplayName = "E" - }, - new ButtonSchema(132, 61, controller, "R") - { - DisplayName = "R" - }, - new ButtonSchema(158, 61, controller, "T") - { - DisplayName = "T" - }, - new ButtonSchema(182, 61, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(206, 61, controller, "U") - { - DisplayName = "U" - }, - new ButtonSchema(232, 61, controller, "I") - { - DisplayName = "I" - }, - new ButtonSchema(252, 61, controller, "O") - { - DisplayName = "O" - }, - new ButtonSchema(278, 61, controller, "P") - { - DisplayName = "P" - }, + new ButtonSchema(54, 61, controller, "Q"), + new ButtonSchema(80, 61, controller, "W"), + new ButtonSchema(108, 61, controller, "E"), + new ButtonSchema(132, 61, controller, "R"), + new ButtonSchema(158, 61, controller, "T"), + new ButtonSchema(182, 61, controller, "Y"), + new ButtonSchema(206, 61, controller, "U"), + new ButtonSchema(232, 61, controller, "I"), + new ButtonSchema(252, 61, controller, "O"), + new ButtonSchema(278, 61, controller, "P"), new ButtonSchema(302, 61, controller, "At") { DisplayName = "@" @@ -550,46 +466,19 @@ namespace BizHawk.Client.EmuHawk { DisplayName = "RETURN" }, - new ButtonSchema(30, 84, controller, "Contro") + new ButtonSchema(30, 84, controller, "Control") { DisplayName = "CTR" }, - new ButtonSchema(70, 84, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(94, 84, controller, "S") - { - DisplayName = "S" - }, - new ButtonSchema(118, 84, controller, "D") - { - DisplayName = "D" - }, - new ButtonSchema(144, 84, controller, "F") - { - DisplayName = "F" - }, - new ButtonSchema(168, 84, controller, "G") - { - DisplayName = "G" - }, - new ButtonSchema(194, 84, controller, "H") - { - DisplayName = "H" - }, - new ButtonSchema(220, 84, controller, "J") - { - DisplayName = "J" - }, - new ButtonSchema(242, 84, controller, "K") - { - DisplayName = "K" - }, - new ButtonSchema(266, 84, controller, "L") - { - DisplayName = "L" - }, + new ButtonSchema(70, 84, controller, "A"), + new ButtonSchema(94, 84, controller, "S"), + new ButtonSchema(118, 84, controller, "D"), + new ButtonSchema(144, 84, controller, "F"), + new ButtonSchema(168, 84, controller, "G"), + new ButtonSchema(194, 84, controller, "H"), + new ButtonSchema(220, 84, controller, "J"), + new ButtonSchema(242, 84, controller, "K"), + new ButtonSchema(266, 84, controller, "L"), new ButtonSchema(290, 84, controller, "Semicolon") { DisplayName = ";" @@ -610,34 +499,13 @@ namespace BizHawk.Client.EmuHawk { DisplayName = "SHIFT" }, - new ButtonSchema(58, 107, controller, "Z") - { - DisplayName = "Z" - }, - new ButtonSchema(82, 107, controller, "X") - { - DisplayName = "X" - }, - new ButtonSchema(106, 107, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(130, 107, controller, "V") - { - DisplayName = "V" - }, - new ButtonSchema(154, 107, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(178, 107, controller, "N") - { - DisplayName = "N" - }, - new ButtonSchema(203, 107, controller, "M") - { - DisplayName = "M" - }, + new ButtonSchema(58, 107, controller, "Z"), + new ButtonSchema(82, 107, controller, "X"), + new ButtonSchema(106, 107, controller, "C"), + new ButtonSchema(130, 107, controller, "V"), + new ButtonSchema(154, 107, controller, "B"), + new ButtonSchema(178, 107, controller, "N"), + new ButtonSchema(203, 107, controller, "M"), new ButtonSchema(229, 107, controller, "Comma") { DisplayName = "," diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs index 719f772021..861c691986 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs @@ -39,9 +39,6 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Left(2, 34, $"P{controller} Left"), ButtonSchema.Right(24, 34, $"P{controller} Right"), new ButtonSchema(74, 34, controller, "F") - { - DisplayName = "F" - } } }; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs index 2734814482..c3a72ce0d5 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs @@ -57,30 +57,12 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(32, 71, $"P{controller} Down"), ButtonSchema.Left(11, 62, $"P{controller} Left"), ButtonSchema.Right(53, 62, $"P{controller} Right"), - new ButtonSchema(3, 32, controller, "L1") - { - DisplayName = "L1" - }, - new ButtonSchema(191, 32, controller, "R1") - { - DisplayName = "R1" - }, - new ButtonSchema(3, 10, controller, "L2") - { - DisplayName = "L2" - }, - new ButtonSchema(191, 10, controller, "R2") - { - DisplayName = "R2" - }, - new ButtonSchema(72, 90, controller, "L3") - { - DisplayName = "L3" - }, - new ButtonSchema(130, 90, controller, "R3") - { - DisplayName = "R3" - }, + new ButtonSchema(3, 32, controller, "L1"), + new ButtonSchema(191, 32, controller, "R1"), + new ButtonSchema(3, 10, controller, "L2"), + new ButtonSchema(191, 10, controller, "R2"), + new ButtonSchema(72, 90, controller, "L3"), + new ButtonSchema(130, 90, controller, "R3"), new ButtonSchema(148, 62, controller, "Square") { Icon = Properties.Resources.Square @@ -131,22 +113,10 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(37, 76, $"P{controller} Down"), ButtonSchema.Left(16, 67, $"P{controller} Left"), ButtonSchema.Right(58, 67, $"P{controller} Right"), - new ButtonSchema(8, 37, controller, "L1") - { - DisplayName = "L1" - }, - new ButtonSchema(196, 37, controller, "R1") - { - DisplayName = "R1" - }, - new ButtonSchema(8, 15, controller, "L2") - { - DisplayName = "L2" - }, - new ButtonSchema(196, 15, controller, "R2") - { - DisplayName = "R2" - }, + new ButtonSchema(8, 37, controller, "L1"), + new ButtonSchema(196, 37, controller, "R1"), + new ButtonSchema(8, 15, controller, "L2"), + new ButtonSchema(196, 15, controller, "R2"), new ButtonSchema(153, 67, controller, "Square") { Icon = Properties.Resources.Square @@ -191,18 +161,9 @@ namespace BizHawk.Client.EmuHawk { DisplayName = "S" }, - new ButtonSchema(278, 38, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(308, 55, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(308, 15, controller, "R") - { - DisplayName = "R" - }, + new ButtonSchema(278, 38, controller, "B"), + new ButtonSchema(308, 55, controller, "A"), + new ButtonSchema(308, 15, controller, "R"), new SingleFloatSchema(5, 15, $"P{controller} L") { DisplayName = "L", diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs index 2d9e541bb5..1b01354517 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs @@ -52,14 +52,8 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(34, 61, $"P{controller} Down"), ButtonSchema.Left(22, 39, $"P{controller} Left"), ButtonSchema.Right(44, 39, $"P{controller} Right"), - new ButtonSchema(74, 17, controller, "Mode 1") - { - DisplayName = "Mode 1" - }, - new ButtonSchema(74, 40, controller, "Mode 2") - { - DisplayName = "Mode 2" - }, + new ButtonSchema(74, 17, controller, "Mode 1"), + new ButtonSchema(74, 40, controller, "Mode 2"), new ButtonSchema(77, 63, controller, "Select") { DisplayName = "s" @@ -68,30 +62,12 @@ namespace BizHawk.Client.EmuHawk { DisplayName = "R" }, - new ButtonSchema(140, 63, controller, "IV") - { - DisplayName = "IV" - }, - new ButtonSchema(166, 53, controller, "V") - { - DisplayName = "V" - }, - new ButtonSchema(192, 43, controller, "VI") - { - DisplayName = "VI" - }, - new ButtonSchema(140, 40, controller, "I") - { - DisplayName = "I" - }, - new ButtonSchema(166, 30, controller, "II") - { - DisplayName = "II" - }, + new ButtonSchema(140, 63, controller, "IV"), + new ButtonSchema(166, 53, controller, "V"), + new ButtonSchema(192, 43, controller, "VI"), + new ButtonSchema(140, 40, controller, "I"), + new ButtonSchema(166, 30, controller, "II"), new ButtonSchema(192, 20, controller, "III") - { - DisplayName = "III" - } } }; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs index 54f92663c3..593509789b 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs @@ -28,14 +28,8 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(14, 56, $"P{controller} Down"), ButtonSchema.Left(2, 34, $"P{controller} Left"), ButtonSchema.Right(24, 34, $"P{controller} Right"), - new ButtonSchema(122, 34, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(146, 34, controller, "A") - { - DisplayName = "A" - }, + new ButtonSchema(122, 34, controller, "B"), + new ButtonSchema(146, 34, controller, "A"), new ButtonSchema(52, 34, controller, "Select") { DisplayName = "s" diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs index 1717e2eb94..e5151514a3 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs @@ -77,42 +77,15 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(34, 61, $"P{controller} Down"), ButtonSchema.Left(22, 39, $"P{controller} Left"), ButtonSchema.Right(44, 39, $"P{controller} Right"), - new ButtonSchema(78, 52, controller, "Start") - { - DisplayName = "S" - }, - new ButtonSchema(110, 63, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(134, 53, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(158, 43, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(110, 40, controller, "X") - { - DisplayName = "X" - }, - new ButtonSchema(134, 30, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(158, 20, controller, "Z") - { - DisplayName = "Z" - }, - new ButtonSchema(2, 10, controller, "L") - { - DisplayName = "L" - }, + new ButtonSchema(78, 52, controller, "Start") { DisplayName = "S" }, + new ButtonSchema(110, 63, controller, "A"), + new ButtonSchema(134, 53, controller, "B"), + new ButtonSchema(158, 43, controller, "C"), + new ButtonSchema(110, 40, controller, "X"), + new ButtonSchema(134, 30, controller, "Y"), + new ButtonSchema(158, 20, controller, "Z"), + new ButtonSchema(2, 10, controller, "L"), new ButtonSchema(184, 10, controller, "R") - { - DisplayName = "R" - } } }; } @@ -129,34 +102,13 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(290, 121, $"P{controller} Down"), ButtonSchema.Left(278, 99, $"P{controller} Left"), ButtonSchema.Right(300, 99, $"P{controller} Right"), - new ButtonSchema(334, 112, controller, "Start") - { - DisplayName = "S" - }, - new ButtonSchema(366, 123, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(390, 113, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(414, 103, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(366, 100, controller, "X") - { - DisplayName = "X" - }, - new ButtonSchema(390, 90, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(414, 80, controller, "Z") - { - DisplayName = "Z" - }, + new ButtonSchema(334, 112, controller, "Start") { DisplayName = "S" }, + new ButtonSchema(366, 123, controller, "A"), + new ButtonSchema(390, 113, controller, "B"), + new ButtonSchema(414, 103, controller, "C"), + new ButtonSchema(366, 100, controller, "X"), + new ButtonSchema(390, 90, controller, "Y"), + new ButtonSchema(414, 80, controller, "Z"), new AnalogSchema(6, 74, $"P{controller} Stick Horizontal") { SecondaryNames = new[] { $"P{controller} Stick Vertical" }, @@ -206,9 +158,6 @@ namespace BizHawk.Client.EmuHawk DisplayName = "Right" }, new ButtonSchema(300, 107, controller, "Start") - { - DisplayName = "Start" - } } }; } @@ -230,34 +179,13 @@ namespace BizHawk.Client.EmuHawk }, ButtonSchema.Up(150, 20, $"P{controller} Up"), ButtonSchema.Down(150, 43, $"P{controller} Down"), - new ButtonSchema(180, 63, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(204, 53, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(228, 43, controller, "C") - { - DisplayName = "C" - }, - new ButtonSchema(180, 40, controller, "X") - { - DisplayName = "X" - }, - new ButtonSchema(204, 30, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(228, 20, controller, "Z") - { - DisplayName = "Z" - }, + new ButtonSchema(180, 63, controller, "A"), + new ButtonSchema(204, 53, controller, "B"), + new ButtonSchema(228, 43, controller, "C"), + new ButtonSchema(180, 40, controller, "X"), + new ButtonSchema(204, 30, controller, "Y"), + new ButtonSchema(228, 20, controller, "Z"), new ButtonSchema(268, 20, controller, "Start") - { - DisplayName = "Start" - } } }; } @@ -271,42 +199,15 @@ namespace BizHawk.Client.EmuHawk DefaultSize = new Size(445, 230), Buttons = new[] { - new ButtonSchema(45, 15, controller, "Start") - { - DisplayName = "Start" - }, - new ButtonSchema(5, 58, controller, "L") - { - DisplayName = "L" - }, - new ButtonSchema(105, 58, controller, "R") - { - DisplayName = "R" - }, - new ButtonSchema(30, 43, controller, "X") - { - DisplayName = "X" - }, - new ButtonSchema(55, 43, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(80, 43, controller, "Z") - { - DisplayName = "Z" - }, - new ButtonSchema(30, 70, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(55, 70, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(80, 70, controller, "C") - { - DisplayName = "C" - }, + new ButtonSchema(45, 15, controller, "Start"), + new ButtonSchema(5, 58, controller, "L"), + new ButtonSchema(105, 58, controller, "R"), + new ButtonSchema(30, 43, controller, "X"), + new ButtonSchema(55, 43, controller, "Y"), + new ButtonSchema(80, 43, controller, "Z"), + new ButtonSchema(30, 70, controller, "A"), + new ButtonSchema(55, 70, controller, "B"), + new ButtonSchema(80, 70, controller, "C"), new AnalogSchema(185, 13, $"P{controller} Stick Horizontal") { SecondaryNames = new[] { $"P{controller} Stick Vertical" }, diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs index 47cd31f0ee..de65c2be26 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs @@ -119,38 +119,14 @@ namespace BizHawk.Client.EmuHawk ButtonSchema.Down(34, 61, $"P{controller} Down"), ButtonSchema.Left(22, 39, $"P{controller} Left"), ButtonSchema.Right(44, 39, $"P{controller} Right"), - new ButtonSchema(2, 10, controller, "L") - { - DisplayName = "L" - }, - new ButtonSchema(174, 10, controller, "R") - { - DisplayName = "R" - }, - new ButtonSchema(70, 39, controller, "Select") - { - DisplayName = "s" - }, - new ButtonSchema(92, 39, controller, "Start") - { - DisplayName = "S" - }, - new ButtonSchema(121, 39, controller, "Y") - { - DisplayName = "Y" - }, - new ButtonSchema(145, 52, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(122, 15, controller, "X") - { - DisplayName = "X" - }, + new ButtonSchema(2, 10, controller, "L"), + new ButtonSchema(174, 10, controller, "R"), + new ButtonSchema(70, 39, controller, "Select") { DisplayName = "s" }, + new ButtonSchema(92, 39, controller, "Start") { DisplayName = "S" }, + new ButtonSchema(121, 39, controller, "Y"), + new ButtonSchema(145, 52, controller, "B"), + new ButtonSchema(122, 15, controller, "X"), new ButtonSchema(146, 25, controller, "A") - { - DisplayName = "A" - } } }; } @@ -193,22 +169,10 @@ namespace BizHawk.Client.EmuHawk { TargetSize = new Size(256, 240) }, - new ButtonSchema(284, 17, controller, "Trigger") - { - DisplayName = "Trigger" - }, - new ButtonSchema(284, 47, controller, "Cursor") - { - DisplayName = "Cursor" - }, - new ButtonSchema(284, 77, controller, "Turbo") - { - DisplayName = "Turbo" - }, + new ButtonSchema(284, 17, controller, "Trigger"), + new ButtonSchema(284, 47, controller, "Cursor"), + new ButtonSchema(284, 77, controller, "Turbo"), new ButtonSchema(284, 107, controller, "Pause") - { - DisplayName = "Pause" - } } }; } @@ -226,14 +190,8 @@ namespace BizHawk.Client.EmuHawk { TargetSize = new Size(256, 240) }, - new ButtonSchema(284, 17, controller, "Trigger") - { - DisplayName = "Trigger" - }, + new ButtonSchema(284, 17, controller, "Trigger"), new ButtonSchema(284, 47, controller, "Start") - { - DisplayName = "Start" - } } }; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs index 0e6ae256a9..16c3355b08 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs @@ -24,50 +24,17 @@ namespace BizHawk.Client.EmuHawk DefaultSize = new Size(174, 210), Buttons = new[] { - new ButtonSchema(23, 12, controller, "Y1") - { - DisplayName = "Y1" - }, - new ButtonSchema(9, 34, controller, "Y4") - { - DisplayName = "Y4" - }, - new ButtonSchema(38, 34, controller, "Y2") - { - DisplayName = "Y2" - }, - new ButtonSchema(23, 56, controller, "Y3") - { - DisplayName = "Y3" - }, - new ButtonSchema(23, 92, controller, "X1") - { - DisplayName = "X1" - }, - new ButtonSchema(9, 114, controller, "X4") - { - DisplayName = "X4" - }, - new ButtonSchema(38, 114, controller, "X2") - { - DisplayName = "X2" - }, - new ButtonSchema(23, 136, controller, "X3") - { - DisplayName = "X3" - }, - new ButtonSchema(80, 114, controller, "Start") - { - DisplayName = "S" - }, - new ButtonSchema(110, 114, controller, "B") - { - DisplayName = "B" - }, + new ButtonSchema(23, 12, controller, "Y1"), + new ButtonSchema(9, 34, controller, "Y4"), + new ButtonSchema(38, 34, controller, "Y2"), + new ButtonSchema(23, 56, controller, "Y3"), + new ButtonSchema(23, 92, controller, "X1"), + new ButtonSchema(9, 114, controller, "X4"), + new ButtonSchema(38, 114, controller, "X2"), + new ButtonSchema(23, 136, controller, "X3"), + new ButtonSchema(80, 114, controller, "Start") { DisplayName = "S" }, + new ButtonSchema(110, 114, controller, "B"), new ButtonSchema(133, 103, controller, "A") - { - DisplayName = "A" - } } }; } @@ -80,50 +47,17 @@ namespace BizHawk.Client.EmuHawk DefaultSize = new Size(174, 210), Buttons = new[] { - new ButtonSchema(23, 12, controller, "A") - { - DisplayName = "A" - }, - new ButtonSchema(46, 22, controller, "B") - { - DisplayName = "B" - }, - new ButtonSchema(32, 58, controller, "Start") - { - DisplayName = "S" - }, - new ButtonSchema(23, 112, controller, "Y2") - { - DisplayName = "Y2" - }, - new ButtonSchema(9, 134, controller, "Y1") - { - DisplayName = "Y1" - }, - new ButtonSchema(38, 134, controller, "Y3") - { - DisplayName = "Y3" - }, - new ButtonSchema(23, 156, controller, "Y4") - { - DisplayName = "Y4" - }, - new ButtonSchema(103, 112, controller, "X2") - { - DisplayName = "X2" - }, - new ButtonSchema(89, 134, controller, "X1") - { - DisplayName = "X1" - }, - new ButtonSchema(118, 134, controller, "X3") - { - DisplayName = "X3" - }, + new ButtonSchema(23, 12, controller, "A"), + new ButtonSchema(46, 22, controller, "B"), + new ButtonSchema(32, 58, controller, "Start") { DisplayName = "S" }, + new ButtonSchema(23, 112, controller, "Y2"), + new ButtonSchema(9, 134, controller, "Y1"), + new ButtonSchema(38, 134, controller, "Y3"), + new ButtonSchema(23, 156, controller, "Y4"), + new ButtonSchema(103, 112, controller, "X2"), + new ButtonSchema(89, 134, controller, "X1"), + new ButtonSchema(118, 134, controller, "X3"), new ButtonSchema(103, 156, controller, "X4") - { - DisplayName = "X4" - } } }; }