BizHawk/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs

98 lines
2.4 KiB
C#
Raw Normal View History

2014-06-23 13:44:06 +00:00
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using BizHawk.Client.Common;
2014-06-22 15:43:45 +00:00
namespace BizHawk.Client.EmuHawk
{
2014-06-23 13:44:06 +00:00
[Description("PCE")]
public class PceSchema : IVirtualPadSchema
2014-06-22 15:43:45 +00:00
{
2014-06-23 13:44:06 +00:00
public IEnumerable<VirtualPad> GetPads()
{
yield return new VirtualPad(StandardController(1))
{
Location = new Point(15, 15)
};
yield return new VirtualPad(StandardController(1))
{
Location = new Point(200, 15)
};
}
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,
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 = "II",
Location = new Point(122, 24),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " A",
DisplayName = "I",
Location = new Point(146, 24),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Select",
DisplayName = "s",
Location = new Point(52, 24),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Start",
DisplayName = "R",
Location = new Point(74, 24),
Type = PadSchema.PadInputType.Boolean
}
}
2014-06-22 15:43:45 +00:00
};
}
}
}