diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 8720287da0..a85322d5e1 100644 --- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -906,8 +906,7 @@ - - + diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs index c8d955e0f9..0361da8dbd 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs @@ -134,7 +134,6 @@ namespace BizHawk.Client.EmuHawk Pads.ForEach(p => p.SetReadOnly(false)); } - // TODO if (!Readonly && !Global.Config.VirtualPadSticky) { Pads.ForEach(pad => pad.Clear()); diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/Gen3ButtonSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/Gen3ButtonSchema.cs deleted file mode 100644 index 4865328650..0000000000 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/Gen3ButtonSchema.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; - -using BizHawk.Client.Common; - -namespace BizHawk.Client.EmuHawk -{ - [SchemaAttributes("GEN")] - public class Gen3ButtonSchema : IVirtualPadSchema - { - public IEnumerable GetPads() - { - yield return new VirtualPad(StandardController(1)) - { - Location = new Point(15, 15) - }; - - yield return new VirtualPad(StandardController(2)) - { - Location = new Point(200, 15) - }; - } - - public static PadSchema StandardController(int controller) - { - return new PadSchema - { - IsConsole = false, - DefaultSize = new Size(174, 74), - Buttons = new[] - { - new PadSchema.ButtonScema - { - Name = "P" + controller + " Up", - DisplayName = "", - Icon = Properties.Resources.BlueUp, - Location = new Point(14, 2), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Down", - DisplayName = "", - Icon = Properties.Resources.BlueDown, - Location = new Point(14, 46), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Left", - DisplayName = "", - Icon = Properties.Resources.Back, - Location = new Point(2, 24), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Right", - DisplayName = "", - Icon = Properties.Resources.Forward, - Location = new Point(24, 24), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " B", - DisplayName = "B", - Location = new Point(122, 36), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " A", - DisplayName = "A", - Location = new Point(98, 36), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " C", - DisplayName = "C", - Location = new Point(146, 36), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Start", - DisplayName = "S", - Location = new Point(122, 2), - Type = PadSchema.PadInputType.Boolean - } - } - }; - } - } -} diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/Gen6ButtonSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/Gen6ButtonSchema.cs deleted file mode 100644 index 67c71c6ff9..0000000000 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/Gen6ButtonSchema.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; - -using BizHawk.Client.Common; - -namespace BizHawk.Client.EmuHawk -{ - [SchemaAttributes("GEN")] - public class Gen6ButtonSchema : IVirtualPadSchema - { - public IEnumerable GetPads() - { - yield return new VirtualPad(StandardController(1)) - { - Location = new Point(15, 15) - }; - - yield return new VirtualPad(StandardController(2)) - { - Location = new Point(200, 15) - }; - } - - public static PadSchema StandardController(int controller) - { - //TODO: Need X,Y,Z, M buttons - return new PadSchema - { - IsConsole = false, - DefaultSize = new Size(174, 74), - Buttons = new[] - { - new PadSchema.ButtonScema - { - Name = "P" + controller + " Up", - DisplayName = "", - Icon = Properties.Resources.BlueUp, - Location = new Point(14, 2), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Down", - DisplayName = "", - Icon = Properties.Resources.BlueDown, - Location = new Point(14, 46), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Left", - DisplayName = "", - Icon = Properties.Resources.Back, - Location = new Point(2, 24), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Right", - DisplayName = "", - Icon = Properties.Resources.Forward, - Location = new Point(24, 24), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " B", - DisplayName = "B", - Location = new Point(122, 36), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " A", - DisplayName = "A", - Location = new Point(98, 36), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " C", - DisplayName = "C", - Location = new Point(146, 36), - Type = PadSchema.PadInputType.Boolean - }, - new PadSchema.ButtonScema - { - Name = "P" + controller + " Start", - DisplayName = "S", - Location = new Point(122, 2), - Type = PadSchema.PadInputType.Boolean - } - } - }; - } - } -} diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs new file mode 100644 index 0000000000..cd888c24f3 --- /dev/null +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GenSchema.cs @@ -0,0 +1,184 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; + +using BizHawk.Client.Common; + +namespace BizHawk.Client.EmuHawk +{ + [SchemaAttributes("GEN")] + public class GenSchema : IVirtualPadSchema + { + public IEnumerable GetPads() + { + yield return new VirtualPad(ThreeButtonController(1)); + + yield return new VirtualPad(SixButtonController(2)); + } + + public static PadSchema ThreeButtonController(int controller) + { + return new PadSchema + { + IsConsole = false, + DefaultSize = new Size(174, 90), + Buttons = new[] + { + new PadSchema.ButtonScema + { + Name = "P" + controller + " Up", + DisplayName = "", + Icon = Properties.Resources.BlueUp, + Location = new Point(14, 12), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Down", + DisplayName = "", + Icon = Properties.Resources.BlueDown, + Location = new Point(14, 56), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Left", + DisplayName = "", + Icon = Properties.Resources.Back, + Location = new Point(2, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Right", + DisplayName = "", + Icon = Properties.Resources.Forward, + Location = new Point(24, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " A", + DisplayName = "A", + Location = new Point(98, 40), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " B", + DisplayName = "B", + Location = new Point(122, 40), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " C", + DisplayName = "C", + Location = new Point(146, 40), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Start", + DisplayName = "S", + Location = new Point(122, 12), + Type = PadSchema.PadInputType.Boolean + } + } + }; + } + + public static PadSchema SixButtonController(int controller) + { + return new PadSchema + { + IsConsole = false, + DefaultSize = new Size(174, 90), + Buttons = new[] + { + new PadSchema.ButtonScema + { + Name = "P" + controller + " Up", + DisplayName = "", + Icon = Properties.Resources.BlueUp, + Location = new Point(14, 12), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Down", + DisplayName = "", + Icon = Properties.Resources.BlueDown, + Location = new Point(14, 56), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Left", + DisplayName = "", + Icon = Properties.Resources.Back, + Location = new Point(2, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Right", + DisplayName = "", + Icon = Properties.Resources.Forward, + Location = new Point(24, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " A", + DisplayName = "A", + Location = new Point(98, 40), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " B", + DisplayName = "B", + Location = new Point(122, 40), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " C", + DisplayName = "C", + Location = new Point(146, 40), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " X", + DisplayName = "X", + Location = new Point(98, 65), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Y", + DisplayName = "Y", + Location = new Point(122, 65), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Z", + DisplayName = "Z", + Location = new Point(146, 65), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonScema + { + Name = "P" + controller + " Start", + DisplayName = "S", + Location = new Point(122, 12), + Type = PadSchema.PadInputType.Boolean + } + } + }; + } + } +}