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.Drawing;
using BizHawk.Emulation.Common;
2014-06-23 23:25:08 +00:00
namespace BizHawk.Client.EmuHawk
{
2017-07-12 19:40:10 +00:00
[Schema("GB")]
public class GBSchema : IVirtualPadSchema
2014-06-23 23:25:08 +00:00
{
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)
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
}
2017-05-24 14:07:03 +00:00
private 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[]
{
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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
},
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-23 23:25:08 +00:00
{
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[]
{
2017-04-29 20:41:27 +00:00
new PadSchema.ButtonSchema
2014-06-28 16:16:48 +00:00
{
Name = "Power",
DisplayName = "Power",
Location = new Point(10, 15),
2014-06-23 23:25:08 +00:00
Type = PadSchema.PadInputType.Boolean
}
}
};
}
}
}