125 lines
3.3 KiB
C#
125 lines
3.3 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
|
|
using BizHawk.Client.Common;
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
{
|
|
[SchemaAttributes("WSWAN")]
|
|
public class WonderSwanSchema : IVirtualPadSchema
|
|
{
|
|
public IEnumerable<VirtualPad> GetPads()
|
|
{
|
|
yield return new VirtualPad(StandardController(1))
|
|
{
|
|
Location = new Point(15, 15)
|
|
};
|
|
}
|
|
public static PadSchema StandardController(int controller)
|
|
{
|
|
return new PadSchema
|
|
{
|
|
IsConsole = false,
|
|
DefaultSize = new Size(174, 74),
|
|
Buttons = new[]
|
|
{
|
|
//TODO: Need All Locations and DisplayNames
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Up X",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.BlueUp,
|
|
Location = new Point(14, 2),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Down X",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.BlueDown,
|
|
Location = new Point(14, 46),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Left X",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.Back,
|
|
Location = new Point(2, 24),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Right X",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.Forward,
|
|
Location = new Point(24, 24),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Up Y",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.BlueUp,
|
|
Location = new Point(14, 2),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Down Y",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.BlueDown,
|
|
Location = new Point(14, 46),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Left Y",
|
|
DisplayName = "",
|
|
Icon = Properties.Resources.Back,
|
|
Location = new Point(2, 24),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Right Y",
|
|
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(134, 48),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " A",
|
|
DisplayName = "A",
|
|
Location = new Point(146, 22),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema
|
|
{
|
|
Name = "P" + controller + " Start",
|
|
DisplayName = "S",
|
|
Location = new Point(78, 42),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
},
|
|
new PadSchema.ButtonScema //Power
|
|
{
|
|
Name = "P" + controller + " P",
|
|
DisplayName = "P",
|
|
Location = new Point(110, 34),
|
|
Type = PadSchema.PadInputType.Boolean
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|