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

110 lines
2.5 KiB
C#
Raw Normal View History

2014-06-23 23:25:08 +00:00
using System.Collections.Generic;
using System.ComponentModel;
2014-06-23 23:25:08 +00:00
using System.Drawing;
namespace BizHawk.Client.EmuHawk
{
[SchemaAttributes("GB")]
public class GBSchema : IVirtualPadSchema
2014-06-23 23:25:08 +00:00
{
public IEnumerable<PadSchema> GetPadSchemas()
2014-06-23 23:25:08 +00:00
{
yield return StandardController();
2014-06-28 16:16:48 +00:00
yield return ConsoleButtons();
2014-06-23 23:25:08 +00:00
}
public static PadSchema StandardController()
2014-06-23 23:25:08 +00:00
{
return new PadSchema
{
IsConsole = false,
2014-06-28 16:16:48 +00:00
DefaultSize = new Size(174, 79),
2014-06-23 23:25:08 +00:00
Buttons = new[]
{
new PadSchema.ButtonScema
{
Name = "Up",
2014-06-23 23:25:08 +00:00
DisplayName = "",
Icon = Properties.Resources.BlueUp,
2014-06-28 16:16:48 +00:00
Location = new Point(14, 12),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "Down",
2014-06-23 23:25:08 +00:00
DisplayName = "",
Icon = Properties.Resources.BlueDown,
2014-06-28 16:16:48 +00:00
Location = new Point(14, 56),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "Left",
2014-06-23 23:25:08 +00:00
DisplayName = "",
Icon = Properties.Resources.Back,
2014-06-28 16:16:48 +00:00
Location = new Point(2, 34),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "Right",
2014-06-23 23:25:08 +00:00
DisplayName = "",
Icon = Properties.Resources.Forward,
2014-06-28 16:16:48 +00:00
Location = new Point(24, 34),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "B",
2014-06-23 23:25:08 +00:00
DisplayName = "B",
2014-06-28 16:16:48 +00:00
Location = new Point(122, 34),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "A",
2014-06-23 23:25:08 +00:00
DisplayName = "A",
2014-06-28 16:16:48 +00:00
Location = new Point(146, 34),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "Select",
2014-06-23 23:25:08 +00:00
DisplayName = "s",
2014-06-28 16:16:48 +00:00
Location = new Point(52, 34),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "Start",
2014-06-23 23:25:08 +00:00
DisplayName = "S",
2014-06-28 16:16:48 +00:00
Location = new Point(74, 34),
Type = PadSchema.PadInputType.Boolean
}
}
};
}
private static PadSchema ConsoleButtons()
{
return new PadSchema
{
DisplayName = "Console",
IsConsole = true,
DefaultSize = new Size(75, 50),
Buttons = new[]
{
new PadSchema.ButtonScema
{
Name = "Power",
DisplayName = "Power",
Location = new Point(10, 15),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
}
}
};
}
}
}