From 1f8171fc9bedd71154f90130e115b7d72751f9aa Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 22 Mar 2020 16:23:01 -0500 Subject: [PATCH] PadSchema - remove MaxSize as it wasn't being used, rename DefaultSize to just Size --- .../tools/VirtualPads/VirtualPad.cs | 4 ++-- .../tools/VirtualPads/schema/A26Schema.cs | 14 ++++------- .../tools/VirtualPads/schema/A78Schema.cs | 13 ++++------- .../tools/VirtualPads/schema/AppleIISchema.cs | 4 ++-- .../tools/VirtualPads/schema/C64Schema.cs | 5 ++-- .../tools/VirtualPads/schema/ColecoSchema.cs | 6 ++--- .../tools/VirtualPads/schema/DualGBSchema.cs | 2 +- .../tools/VirtualPads/schema/GBASchema.cs | 7 +++--- .../tools/VirtualPads/schema/GBSchema.cs | 11 ++++----- .../tools/VirtualPads/schema/GGLSchema.cs | 2 +- .../tools/VirtualPads/schema/GenSchema.cs | 14 +++++------ .../tools/VirtualPads/schema/IntvSchema.cs | 4 ++-- .../tools/VirtualPads/schema/LynxSchema.cs | 2 +- .../tools/VirtualPads/schema/N64Schema.cs | 2 +- .../tools/VirtualPads/schema/NdsSchema.cs | 4 ++-- .../tools/VirtualPads/schema/NesSchema.cs | 23 ++++++++----------- .../tools/VirtualPads/schema/NgpSchema.cs | 4 ++-- .../tools/VirtualPads/schema/O2Schema.cs | 2 +- .../tools/VirtualPads/schema/PSXSchema.cs | 8 +++---- .../tools/VirtualPads/schema/PadSchema.cs | 6 ++--- .../tools/VirtualPads/schema/PceSchema.cs | 2 +- .../tools/VirtualPads/schema/PcfxSchema.cs | 4 ++-- .../tools/VirtualPads/schema/SGBSchema.cs | 2 +- .../tools/VirtualPads/schema/SaturnSchema.cs | 14 +++++------ .../tools/VirtualPads/schema/SmsSchema.cs | 4 ++-- .../tools/VirtualPads/schema/SnesSchema.cs | 12 +++++----- .../tools/VirtualPads/schema/VECSchema.cs | 4 ++-- .../VirtualPads/schema/VirtualBoySchema.cs | 4 ++-- .../VirtualPads/schema/WonderSwanSchema.cs | 6 ++--- .../VirtualPads/schema/ZXSpectrumSchema.cs | 6 ++--- 30 files changed, 89 insertions(+), 106 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs index c8128d5d56..8e6034be1c 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualPad.cs @@ -48,8 +48,8 @@ namespace BizHawk.Client.EmuHawk private void VirtualPadControl_Load(object sender, EventArgs e) { - Size = UIHelper.Scale(_schema.DefaultSize); - MaximumSize = UIHelper.Scale(_schema.MaxSize ?? _schema.DefaultSize); + Size = UIHelper.Scale(_schema.Size); + MaximumSize = UIHelper.Scale(_schema.Size); PadBox.Text = _schema.DisplayName; foreach (var button in _schema.Buttons) { diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A26Schema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A26Schema.cs index e3f4c9bb48..ed5432b9ce 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A26Schema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A26Schema.cs @@ -47,8 +47,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -65,8 +64,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(334, 94), - MaxSize = new Size(334, 94), + Size = new Size(334, 94), Buttons = new[] { new ButtonSchema(5, 24, controller, "Button 1") @@ -98,8 +96,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -118,8 +115,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(334, 94), - MaxSize = new Size(334, 94), + Size = new Size(334, 94), Buttons = new[] { new ButtonSchema(5, 24, controller, "Button") @@ -146,7 +142,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(185, 75), + Size = new Size(185, 75), Buttons = new[] { new ButtonSchema(10, 15, "Select"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A78Schema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A78Schema.cs index de9e5da926..e9b171caa4 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A78Schema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/A78Schema.cs @@ -56,8 +56,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -81,8 +80,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -102,7 +100,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(250, 74), + Size = new Size(250, 74), Buttons = new[] { new SingleFloatSchema(23, 15, controller, "Paddle"), @@ -119,8 +117,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Light Gun", - DefaultSize = new Size(356, 290), - MaxSize = new Size(356, 290), + Size = new Size(356, 290), Buttons = new[] { new TargetedPairSchema(14, 17, $"P{controller} VPos") @@ -143,7 +140,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(215, 50), + Size = new Size(215, 50), Buttons = new[] { new ButtonSchema(10, 15, "Select"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/AppleIISchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/AppleIISchema.cs index 103744a0a5..d9cb136ad3 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/AppleIISchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/AppleIISchema.cs @@ -20,7 +20,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Keyboard", - DefaultSize = new Size(390, 150), + Size = new Size(390, 150), Buttons = new[] { /************************** Row 1 **************************/ @@ -107,7 +107,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Disk Selection", - DefaultSize = new Size(120, 50), + Size = new Size(120, 50), Buttons = new[] { new ButtonSchema(10, 18, "Next Disk") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/C64Schema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/C64Schema.cs index cc1adfa42a..8aba254333 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/C64Schema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/C64Schema.cs @@ -21,8 +21,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -39,7 +38,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Keyboard", - DefaultSize = new Size(500, 150), + Size = new Size(500, 150), Buttons = new[] { Key(16, 18, "Left Arrow", "←"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs index 6980f0e9cd..e4d2b5b623 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ColecoSchema.cs @@ -41,7 +41,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(128, 200), + Size = new Size(128, 200), Buttons = new[] { ButtonSchema.Up(50, 11, controller), @@ -71,7 +71,7 @@ namespace BizHawk.Client.EmuHawk var controllerDefRanges = new ColecoTurboController(controller).Definition.FloatRanges; return new PadSchema { - DefaultSize = new Size(275, 260), + Size = new Size(275, 260), Buttons = new[] { new AnalogSchema(6, 14, $"P{controller} Disc X") @@ -91,7 +91,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(195, 260), + Size = new Size(195, 260), Buttons = new[] { ButtonSchema.Up(50, 11, controller), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs index ee9f4bad7d..ce45ea16fc 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/DualGBSchema.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 79), + Size = new Size(174, 79), Buttons = new[] { ButtonSchema.Up(14, 12, controller), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBASchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBASchema.cs index ed46edcfc1..bf9416f029 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBASchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBASchema.cs @@ -26,8 +26,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Tilt Controls", - DefaultSize = new Size(256, 240), - MaxSize = new Size(256, 326), + Size = new Size(256, 240), Buttons = new[] { Tilt(10, 15, "X"), @@ -54,7 +53,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(194, 90), + Size = new Size(194, 90), Buttons = new[] { ButtonSchema.Up(29, 17), @@ -75,7 +74,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(75, 50), + Size = new Size(75, 50), Buttons = new[] { new ButtonSchema(10, 15, "Power") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBSchema.cs index 0c4dcfba4d..4bb1a31c04 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GBSchema.cs @@ -34,7 +34,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 79), + Size = new Size(174, 79), Buttons = new[] { ButtonSchema.Up(14, 12), @@ -53,7 +53,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(75, 50), + Size = new Size(75, 50), Buttons = new[] { new ButtonSchema(10, 15, "Power") @@ -66,7 +66,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 79), + Size = new Size(174, 79), Buttons = new[] { ButtonSchema.Up(14, 12, 1), @@ -85,7 +85,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(75, 50), + Size = new Size(75, 50), Buttons = new[] { new ButtonSchema(10, 15, "P1 Power") { DisplayName = "Power" } @@ -98,8 +98,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Tilt", - DefaultSize = new Size(356, 290), - MaxSize = new Size(356, 290), + Size = new Size(356, 290), Buttons = new[] { new TargetedPairSchema(14, 17, "P1 Tilt X") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs index bcff86767f..a6efbd3144 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 90), + Size = new Size(174, 90), Buttons = new[] { ButtonSchema.Up(14, 12, controller), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs index f9430445aa..193826a1a1 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs @@ -70,7 +70,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 90), + Size = new Size(174, 90), Buttons = new[] { ButtonSchema.Up(14, 12, controller), @@ -89,7 +89,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 90), + Size = new Size(174, 90), Buttons = new[] { ButtonSchema.Up(14, 12, controller), @@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Light Gun", - DefaultSize = new Size(356, 300), + Size = new Size(356, 300), Buttons = new[] { new TargetedPairSchema(14, 17, $"P{controller} Lightgun X") @@ -137,7 +137,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Mouse", - DefaultSize = new Size(418, 290), + Size = new Size(418, 290), Buttons = new[] { new AnalogSchema(14, 17, $"P{controller} Mouse X") @@ -169,7 +169,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(150, 50), + Size = new Size(150, 50), Buttons = new[] { new ButtonSchema(10, 15, "Reset"), @@ -182,7 +182,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(110, 110), + Size = new Size(110, 110), Buttons = new[] { ButtonSchema.Up(47, 10, controller), @@ -202,7 +202,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 90), + Size = new Size(174, 90), Buttons = new[] { new ButtonSchema(98, 40, controller, "A"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/IntvSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/IntvSchema.cs index 55ef6b78dc..37094163a2 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/IntvSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/IntvSchema.cs @@ -44,7 +44,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(148, 332), + Size = new Size(148, 332), Buttons = new[] { new ButtonSchema(25, 15, controller , "Key 1") @@ -187,7 +187,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(280, 332), + Size = new Size(280, 332), Buttons = new[] { new ButtonSchema(91, 15, controller, "Key 1") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/LynxSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/LynxSchema.cs index 82cd2a61d4..5f9ade0e5d 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/LynxSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/LynxSchema.cs @@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk { yield return new PadSchema { - DefaultSize = new Size(194, 90), + Size = new Size(194, 90), Buttons = new[] { ButtonSchema.Up(14, 12), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/N64Schema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/N64Schema.cs index 32a636bc38..290d0c3ccf 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/N64Schema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/N64Schema.cs @@ -27,7 +27,7 @@ namespace BizHawk.Client.EmuHawk var controllerDefRanges = N64Input.N64ControllerDefinition.FloatRanges; return new PadSchema { - DefaultSize = new Size(275, 316), + Size = new Size(275, 316), Buttons = new[] { ButtonSchema.Up(24, 230, $"P{controller} DPad U"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NdsSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NdsSchema.cs index 20653f1e20..13da565a64 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NdsSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NdsSchema.cs @@ -18,7 +18,7 @@ namespace BizHawk.Client.EmuHawk.tools.VirtualPads.schema { return new ConsoleSchema { - DefaultSize = new Size(60, 45), + Size = new Size(60, 45), Buttons = new [] { new ButtonSchema(8, 18, "Lid") @@ -30,7 +30,7 @@ namespace BizHawk.Client.EmuHawk.tools.VirtualPads.schema { return new PadSchema { - DefaultSize = new Size(440, 260), + Size = new Size(440, 260), Buttons = new [] { ButtonSchema.Up(14, 79), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs index ed72d33fb3..5869c77e9b 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NesSchema.cs @@ -164,7 +164,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(150, 50), + Size = new Size(150, 50), Buttons = new[] { new ButtonSchema(10, 15, "Reset"), @@ -201,7 +201,7 @@ namespace BizHawk.Client.EmuHawk return new ConsoleSchema { - DefaultSize = new Size(width, 100), + Size = new Size(width, 100), Buttons = buttons }; } @@ -211,8 +211,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Player {controller}", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -233,8 +232,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Player 2", - DefaultSize = new Size(174, 74), - MaxSize = new Size(174, 74), + Size = new Size(174, 74), Buttons = new[] { ButtonSchema.Up(23, 15, controller), @@ -253,8 +251,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Zapper", - DefaultSize = new Size(356, 290), - MaxSize = new Size(356, 290), + Size = new Size(356, 290), Buttons = new[] { new TargetedPairSchema(14, 17, $"P{controller} Zapper X") @@ -271,8 +268,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Arkanoid Paddle", - DefaultSize = new Size(380, 110), - MaxSize = new Size(380, 110), + Size = new Size(380, 110), Buttons = new[] { new SingleFloatSchema(14, 17, controller, "Paddle") @@ -291,7 +287,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Power Pad", - DefaultSize = new Size(154, 114), + Size = new Size(154, 114), Buttons = new[] { PowerButton(14, 17, controller, 1), @@ -323,8 +319,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Tablet", - DefaultSize = new Size(356, 290), - MaxSize = new Size(356, 290), + Size = new Size(356, 290), Buttons = new[] { new TargetedPairSchema(14, 17, $"P{controller} Pen X") @@ -342,7 +337,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Family Basic Keyboard", - DefaultSize = new Size(560, 180), + Size = new Size(560, 180), Buttons = new[] { new ButtonSchema(23, 15, controller, "F1") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NgpSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NgpSchema.cs index 2fd171e3ab..0c1dfb20e0 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NgpSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/NgpSchema.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 79), + Size = new Size(174, 79), Buttons = new[] { ButtonSchema.Up(14, 12), @@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(75, 50), + Size = new Size(75, 50), Buttons = new[] { new ButtonSchema(10, 15, "Power") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs index 5e8438aa1d..68726ce83f 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/O2Schema.cs @@ -31,7 +31,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(100, 100), + Size = new Size(100, 100), Buttons = new[] { ButtonSchema.Up(14, 12, controller), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs index 5f5861e5fd..0a1cdd2855 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PSXSchema.cs @@ -49,7 +49,7 @@ namespace BizHawk.Client.EmuHawk var stickRanges = Octoshock.DualShockStickRanges; return new PadSchema { - DefaultSize = new Size(500, 290), + Size = new Size(500, 290), DisplayName = $"DualShock Player{controller}", Buttons = new[] { @@ -105,7 +105,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(240, 115), + Size = new Size(240, 115), DisplayName = $"Gamepad Player{controller}", Buttons = new[] { @@ -149,7 +149,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(343, 195), + Size = new Size(343, 195), DisplayName = $"NeGcon Player{controller}", Buttons = new[] { @@ -196,7 +196,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(310, 400), + Size = new Size(310, 400), Buttons = new[] { new ButtonSchema(10, 15, "Reset"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PadSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PadSchema.cs index bcb48cd069..fd31b9fa7d 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PadSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PadSchema.cs @@ -5,11 +5,9 @@ namespace BizHawk.Client.EmuHawk { public class PadSchema { - // Default size of the pad - public Size DefaultSize { get; set; } - public Size? MaxSize { get; set; } + public Size Size { get; set; } public bool IsConsole { get; protected set; } - public IEnumerable Buttons { get; set; } + public IEnumerable Buttons { get; set; } = new List(); public string DisplayName { get; set; } // The name of the pad itself, presumably will be displayed by the given pad time if supplied } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs index ddcfa9a7f9..bb2055c47d 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs @@ -52,7 +52,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 90), + Size = new Size(174, 90), Buttons = new[] { ButtonSchema.Up(14, 12, controller), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs index bde4ab7892..678d642c28 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs @@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(230, 100), + Size = new Size(230, 100), Buttons = new[] { ButtonSchema.Up(34, 17, controller), @@ -77,7 +77,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Mouse", - DefaultSize = new Size(375, 320), + Size = new Size(375, 320), Buttons = new[] { new TargetedPairSchema(14, 17, $"P{controller} X") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs index 6b73e44ac8..d89ccf7e74 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SGBSchema.cs @@ -21,7 +21,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 79), + Size = new Size(174, 79), Buttons = new[] { ButtonSchema.Up(14, 12, controller), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs index 06c39e7660..44bc0b8a0e 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SaturnSchema.cs @@ -70,7 +70,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(250, 100), + Size = new Size(250, 100), Buttons = new[] { ButtonSchema.Up(34, 17, controller), @@ -95,7 +95,7 @@ namespace BizHawk.Client.EmuHawk var axisRanges = SaturnusControllerDeck.ThreeDeeAxisRanges; return new PadSchema { - DefaultSize = new Size(458, 285), + Size = new Size(458, 285), Buttons = new[] { ButtonSchema.Up(290, 77, controller), @@ -138,7 +138,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Mouse", - DefaultSize = new Size(375, 320), + Size = new Size(375, 320), Buttons = new[] { new TargetedPairSchema(14, 17, $"P{controller} X") @@ -167,7 +167,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Wheel", - DefaultSize = new Size(325, 100), + Size = new Size(325, 100), Buttons = new[] { new SingleFloatSchema(8, 12, controller, "Wheel") @@ -195,7 +195,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Mission", - DefaultSize = new Size(445, 230), + Size = new Size(445, 230), Buttons = new[] { new ButtonSchema(45, 15, controller, "Start"), @@ -230,7 +230,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Dual Mission", - DefaultSize = new Size(680, 230), + Size = new Size(680, 230), Buttons = new ButtonSchema[] { new AnalogSchema(58, 13, $"P{controller} Left Stick Horizontal") @@ -269,7 +269,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(250, 50), + Size = new Size(250, 50), Buttons = new[] { new ButtonSchema(10, 15, "Reset"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SmsSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SmsSchema.cs index 44ea141d2b..0ae2cf9bbd 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SmsSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SmsSchema.cs @@ -28,7 +28,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(174, 90), + Size = new Size(174, 90), Buttons = StandardButtons(controller, isSms) }; } @@ -52,7 +52,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(150, 50), + Size = new Size(150, 50), Buttons = ConsoleButtons(isSms) }; } diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs index df86742658..9276f55ae1 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs @@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(200, 90), + Size = new Size(200, 90), Buttons = new[] { ButtonSchema.Up(34, 17, controller), @@ -136,7 +136,7 @@ namespace BizHawk.Client.EmuHawk var controllerDefRanges = new SnesMouseController().Definition.FloatRanges; return new PadSchema { - DefaultSize = new Size(345, 225), + Size = new Size(345, 225), Buttons = new[] { new AnalogSchema(6, 14, $"P{controller} Mouse X") @@ -161,7 +161,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Super Scope", - DefaultSize = new Size(356, 290), + Size = new Size(356, 290), MaxSize = new Size(356, 290), Buttons = new[] { @@ -182,7 +182,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Justifier", - DefaultSize = new Size(356, 290), + Size = new Size(356, 290), MaxSize = new Size(356, 290), Buttons = new[] { @@ -201,7 +201,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Payload", - DefaultSize = new Size(460, 85), + Size = new Size(460, 85), Buttons = PayLoadButtons(controller) }; } @@ -242,7 +242,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(150, 50), + Size = new Size(150, 50), Buttons = new[] { new ButtonSchema(10, 15, "Reset"), diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VECSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VECSchema.cs index ecf37efda8..6ce0572cd4 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VECSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VECSchema.cs @@ -41,7 +41,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(200, 100), + Size = new Size(200, 100), Buttons = new[] { ButtonSchema.Up(14, 12, controller), @@ -73,7 +73,7 @@ namespace BizHawk.Client.EmuHawk var controllerDefRanges = new AnalogControls(controller).Definition.FloatRanges; return new PadSchema { - DefaultSize = new Size(280, 380), + Size = new Size(280, 380), Buttons = new[] { new ButtonSchema(74, 34, controller, "Button 1") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VirtualBoySchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VirtualBoySchema.cs index b77136e59f..8607e273e5 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VirtualBoySchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/VirtualBoySchema.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk { return new PadSchema { - DefaultSize = new Size(222, 103), + Size = new Size(222, 103), Buttons = new[] { ButtonSchema.Up(14, 36, "L_Up"), @@ -44,7 +44,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(75, 50), + Size = new Size(75, 50), Buttons = new[] { new ButtonSchema(10, 15, "Power") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs index 16c3355b08..a3ddafb9b2 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/WonderSwanSchema.cs @@ -21,7 +21,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Standard", - DefaultSize = new Size(174, 210), + Size = new Size(174, 210), Buttons = new[] { new ButtonSchema(23, 12, controller, "Y1"), @@ -44,7 +44,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "Rotated", - DefaultSize = new Size(174, 210), + Size = new Size(174, 210), Buttons = new[] { new ButtonSchema(23, 12, controller, "A"), @@ -66,7 +66,7 @@ namespace BizHawk.Client.EmuHawk { return new ConsoleSchema { - DefaultSize = new Size(75, 50), + Size = new Size(75, 50), Buttons = new[] { new ButtonSchema(7, 15, "Power") diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs index 93cf662e34..2f7677af7f 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/ZXSpectrumSchema.cs @@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = $"Joystick {controller}", - DefaultSize = new Size(174, 74), + Size = new Size(174, 74), MaxSize = new Size(174, 74), Buttons = new[] { @@ -119,7 +119,7 @@ namespace BizHawk.Client.EmuHawk var ps = new PadSchema { DisplayName = "Keyboard", - DefaultSize = new Size(500, 170) + Size = new Size(500, 170) }; var btns = new List(); @@ -176,7 +176,7 @@ namespace BizHawk.Client.EmuHawk return new PadSchema { DisplayName = "DATACORDER", - DefaultSize = new Size(174, 74), + Size = new Size(174, 74), MaxSize = new Size(174, 74), Buttons = new[] {