2014-06-23 13:44:06 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
2014-06-28 15:56:20 +00:00
|
|
|
|
using System.Linq;
|
2014-06-23 13:44:06 +00:00
|
|
|
|
|
|
|
|
|
using BizHawk.Client.Common;
|
2014-06-22 15:43:45 +00:00
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
2014-06-23 23:46:44 +00:00
|
|
|
|
[SchemaAttributes("PCE")]
|
2014-06-23 13:44:06 +00:00
|
|
|
|
public class PceSchema : IVirtualPadSchema
|
2014-06-22 15:43:45 +00:00
|
|
|
|
{
|
2014-06-27 17:02:46 +00:00
|
|
|
|
public IEnumerable<PadSchema> GetPadSchemas()
|
2014-06-23 13:44:06 +00:00
|
|
|
|
{
|
2014-06-28 15:56:20 +00:00
|
|
|
|
for (int i = 0; i < Global.Emulator.ControllerDefinition.PlayerCount; i++)
|
|
|
|
|
{
|
|
|
|
|
yield return StandardController(i);
|
|
|
|
|
}
|
2014-06-23 13:44:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-22 15:43:45 +00:00
|
|
|
|
public static PadSchema StandardController(int controller)
|
|
|
|
|
{
|
|
|
|
|
return new PadSchema
|
|
|
|
|
{
|
2014-06-23 01:43:33 +00:00
|
|
|
|
IsConsole = false,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
DefaultSize = new Size(174, 90),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Buttons = new[]
|
|
|
|
|
{
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Up",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.BlueUp,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(14, 12),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Down",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.BlueDown,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(14, 56),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Left",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.Back,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(2, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Right",
|
|
|
|
|
DisplayName = "",
|
|
|
|
|
Icon = Properties.Resources.Forward,
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(24, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " B",
|
|
|
|
|
DisplayName = "II",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(122, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " A",
|
|
|
|
|
DisplayName = "I",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(146, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Select",
|
|
|
|
|
DisplayName = "s",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(52, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
},
|
|
|
|
|
new PadSchema.ButtonScema
|
|
|
|
|
{
|
|
|
|
|
Name = "P" + controller + " Start",
|
|
|
|
|
DisplayName = "R",
|
2014-06-28 22:50:57 +00:00
|
|
|
|
Location = new Point(74, 34),
|
2014-06-23 01:43:33 +00:00
|
|
|
|
Type = PadSchema.PadInputType.Boolean
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-22 15:43:45 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|