virtualpad schema - cleanups
This commit is contained in:
parent
1f8171fc9b
commit
f98003f98e
|
@ -63,14 +63,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
ButtonSchema.Down(23, 36, controller),
|
||||
ButtonSchema.Left(2, 24, controller),
|
||||
ButtonSchema.Right(44, 24, controller),
|
||||
new ButtonSchema(120, 24, controller, "Trigger")
|
||||
{
|
||||
DisplayName = "1"
|
||||
},
|
||||
new ButtonSchema(145, 24, controller, "Trigger 2")
|
||||
{
|
||||
DisplayName = "2"
|
||||
}
|
||||
new ButtonSchema(120, 24, controller, "Trigger") { DisplayName = "1" },
|
||||
new ButtonSchema(145, 24, controller, "Trigger 2") { DisplayName = "2" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -104,10 +98,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Buttons = new[]
|
||||
{
|
||||
new SingleFloatSchema(23, 15, controller, "Paddle"),
|
||||
new ButtonSchema(12, 90, $"P{controller} Trigger")
|
||||
{
|
||||
DisplayName = "1"
|
||||
}
|
||||
new ButtonSchema(12, 90, controller, "Trigger") { DisplayName = "1" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -129,9 +120,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
},
|
||||
new ButtonSchema(284, 17, controller, "Trigger")
|
||||
{
|
||||
DisplayName = "Trigger"
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -110,14 +110,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
Size = new Size(120, 50),
|
||||
Buttons = new[]
|
||||
{
|
||||
new ButtonSchema(10, 18, "Next Disk")
|
||||
{
|
||||
DisplayName = "Next"
|
||||
},
|
||||
new ButtonSchema(50, 18, "Previous Disk")
|
||||
{
|
||||
DisplayName = "Previous"
|
||||
}
|
||||
new ButtonSchema(10, 18, "Next Disk") { DisplayName = "Next" },
|
||||
new ButtonSchema(50, 18, "Previous Disk") { DisplayName = "Previous" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
using System.Linq;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.ColecoVision;
|
||||
|
||||
|
@ -42,27 +42,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return new PadSchema
|
||||
{
|
||||
Size = new Size(128, 200),
|
||||
Buttons = new[]
|
||||
{
|
||||
ButtonSchema.Up(50, 11, controller),
|
||||
ButtonSchema.Down(50, 32, controller),
|
||||
ButtonSchema.Left(29, 22, controller),
|
||||
ButtonSchema.Right(71, 22, controller),
|
||||
new ButtonSchema(3, 42, controller, "L"),
|
||||
new ButtonSchema(100, 42, controller, "R"),
|
||||
new ButtonSchema(27, 85, controller, "1"),
|
||||
new ButtonSchema(50, 85, controller, "2"),
|
||||
new ButtonSchema(73, 85, controller, "3"),
|
||||
new ButtonSchema(27, 108, controller, "4"),
|
||||
new ButtonSchema(50, 108, controller, "5"),
|
||||
new ButtonSchema(73, 108, controller, "6"),
|
||||
new ButtonSchema(27, 131, controller, "7"),
|
||||
new ButtonSchema(50, 131, controller, "8"),
|
||||
new ButtonSchema(73, 131, controller, "9"),
|
||||
new ButtonSchema(27, 154, controller, "Star") { DisplayName = "*" },
|
||||
new ButtonSchema(50, 154, controller, "0"),
|
||||
new ButtonSchema(73, 154, controller, "Pound") { DisplayName = "#" }
|
||||
}
|
||||
Buttons = StandardButtons(controller)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -80,9 +60,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
SecondaryAxisRange = controllerDefRanges[1]
|
||||
},
|
||||
new ButtonSchema(6, 224, controller, "Pedal")
|
||||
{
|
||||
DisplayName = "Pedal"
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -92,24 +69,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
return new PadSchema
|
||||
{
|
||||
Size = new Size(195, 260),
|
||||
Buttons = new[]
|
||||
Buttons = StandardButtons(controller).Concat(new[]
|
||||
{
|
||||
ButtonSchema.Up(50, 11, controller),
|
||||
ButtonSchema.Down(50, 32, controller),
|
||||
ButtonSchema.Left(29, 22, controller),
|
||||
ButtonSchema.Right(71, 22, controller),
|
||||
new ButtonSchema(27, 85, controller, "1"),
|
||||
new ButtonSchema(50, 85, controller, "2"),
|
||||
new ButtonSchema(73, 85, controller, "3"),
|
||||
new ButtonSchema(27, 108, controller, "4"),
|
||||
new ButtonSchema(50, 108, controller, "5"),
|
||||
new ButtonSchema(73, 108, controller, "6"),
|
||||
new ButtonSchema(27, 131, controller, "7"),
|
||||
new ButtonSchema(50, 131, controller, "8"),
|
||||
new ButtonSchema(73, 131, controller, "9"),
|
||||
new ButtonSchema(27, 154, controller, "Star") { DisplayName = "*" },
|
||||
new ButtonSchema(50, 154, controller, "0"),
|
||||
new ButtonSchema(73, 154, controller, "Pound") { DisplayName = "#" },
|
||||
new SingleFloatSchema(6, 200, controller, "Disc X")
|
||||
{
|
||||
DisplayName = "Disc",
|
||||
|
@ -121,7 +82,30 @@ namespace BizHawk.Client.EmuHawk
|
|||
new ButtonSchema(126, 40, controller, "Red"),
|
||||
new ButtonSchema(126, 65, controller, "Purple"),
|
||||
new ButtonSchema(126, 90, controller, "Blue")
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<ButtonSchema> StandardButtons(int controller)
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
ButtonSchema.Up(50, 11, controller),
|
||||
ButtonSchema.Down(50, 32, controller),
|
||||
ButtonSchema.Left(29, 22, controller),
|
||||
ButtonSchema.Right(71, 22, controller),
|
||||
new ButtonSchema(27, 85, controller, "1"),
|
||||
new ButtonSchema(50, 85, controller, "2"),
|
||||
new ButtonSchema(73, 85, controller, "3"),
|
||||
new ButtonSchema(27, 108, controller, "4"),
|
||||
new ButtonSchema(50, 108, controller, "5"),
|
||||
new ButtonSchema(73, 108, controller, "6"),
|
||||
new ButtonSchema(27, 131, controller, "7"),
|
||||
new ButtonSchema(50, 131, controller, "8"),
|
||||
new ButtonSchema(73, 131, controller, "9"),
|
||||
new ButtonSchema(27, 154, controller, "Star") { DisplayName = "*" },
|
||||
new ButtonSchema(50, 154, controller, "0"),
|
||||
new ButtonSchema(73, 154, controller, "Pound") { DisplayName = "#" }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
using System.Linq;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
||||
|
||||
|
@ -71,17 +71,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return new PadSchema
|
||||
{
|
||||
Size = new Size(174, 90),
|
||||
Buttons = new[]
|
||||
{
|
||||
ButtonSchema.Up(14, 12, controller),
|
||||
ButtonSchema.Down(14, 56, controller),
|
||||
ButtonSchema.Left(2, 34, controller),
|
||||
ButtonSchema.Right(24, 34, controller),
|
||||
new ButtonSchema(98, 40, controller, "A"),
|
||||
new ButtonSchema(122, 40, controller, "B"),
|
||||
new ButtonSchema(146, 40, controller, "C"),
|
||||
new ButtonSchema(122, 12, controller, "Start") { DisplayName = "S" }
|
||||
}
|
||||
Buttons = ThreeButtons(controller)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -90,20 +80,27 @@ namespace BizHawk.Client.EmuHawk
|
|||
return new PadSchema
|
||||
{
|
||||
Size = new Size(174, 90),
|
||||
Buttons = new[]
|
||||
Buttons = ThreeButtons(controller).Concat(new[]
|
||||
{
|
||||
ButtonSchema.Up(14, 12, controller),
|
||||
ButtonSchema.Down(14, 56, controller),
|
||||
ButtonSchema.Left(2, 34, controller),
|
||||
ButtonSchema.Right(24, 34, controller),
|
||||
new ButtonSchema(98, 40, controller, "A"),
|
||||
new ButtonSchema(122, 40, controller, "B"),
|
||||
new ButtonSchema(146, 40, controller, "C"),
|
||||
new ButtonSchema(98, 65, controller, "X"),
|
||||
new ButtonSchema(122, 65, controller, "Y"),
|
||||
new ButtonSchema(146, 65, controller, "Z"),
|
||||
new ButtonSchema(122, 12, controller, "Start") { DisplayName = "S" }
|
||||
}
|
||||
new ButtonSchema(146, 65, controller, "Z")
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<ButtonSchema> ThreeButtons(int controller)
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
ButtonSchema.Up(14, 12, controller),
|
||||
ButtonSchema.Down(14, 56, controller),
|
||||
ButtonSchema.Left(2, 34, controller),
|
||||
ButtonSchema.Right(24, 34, controller),
|
||||
new ButtonSchema(98, 40, controller, "A"),
|
||||
new ButtonSchema(122, 40, controller, "B"),
|
||||
new ButtonSchema(146, 40, controller, "C"),
|
||||
new ButtonSchema(122, 12, controller, "Start") { DisplayName = "S" }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
using System.Linq;
|
||||
using BizHawk.Common.ReflectionExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Intellivision;
|
||||
|
@ -45,74 +45,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = $"Player {controller}",
|
||||
Size = new Size(148, 332),
|
||||
Buttons = new[]
|
||||
Buttons = StandardButtons(controller).Concat(new[]
|
||||
{
|
||||
new ButtonSchema(25, 15, controller , "Key 1")
|
||||
{
|
||||
DisplayName = "1"
|
||||
},
|
||||
new ButtonSchema(51, 15, controller , "Key 2")
|
||||
{
|
||||
DisplayName = "2"
|
||||
},
|
||||
new ButtonSchema(77, 15, controller , "Key 3")
|
||||
{
|
||||
DisplayName = "3"
|
||||
},
|
||||
new ButtonSchema(25, 41, controller , "Key 4")
|
||||
{
|
||||
DisplayName = "4"
|
||||
},
|
||||
new ButtonSchema(51, 41, controller , "Key 5")
|
||||
{
|
||||
DisplayName = "5"
|
||||
},
|
||||
new ButtonSchema(77, 41, controller , "Key 6")
|
||||
{
|
||||
DisplayName = "6"
|
||||
},
|
||||
new ButtonSchema(25, 67, controller , "Key 7")
|
||||
{
|
||||
DisplayName = "7"
|
||||
},
|
||||
new ButtonSchema(51, 67, controller , "Key 8")
|
||||
{
|
||||
DisplayName = "8"
|
||||
},
|
||||
new ButtonSchema(77, 67, controller , "Key 9")
|
||||
{
|
||||
DisplayName = "9"
|
||||
},
|
||||
new ButtonSchema(25, 93, controller, "Clear")
|
||||
{
|
||||
DisplayName = "C"
|
||||
},
|
||||
new ButtonSchema(51, 93, controller , "Key 0")
|
||||
{
|
||||
DisplayName = "0"
|
||||
},
|
||||
new ButtonSchema(77, 93, controller, "Enter")
|
||||
{
|
||||
DisplayName = "E"
|
||||
},
|
||||
new ButtonSchema(2, 41, controller, "Top")
|
||||
{
|
||||
DisplayName = "T"
|
||||
},
|
||||
new ButtonSchema(100, 41, controller, "Top")
|
||||
{
|
||||
DisplayName = "T"
|
||||
},
|
||||
new ButtonSchema(2, 67, controller, "L")
|
||||
{
|
||||
DisplayName = "L"
|
||||
},
|
||||
new ButtonSchema(100, 67, controller, "R")
|
||||
{
|
||||
DisplayName = "R"
|
||||
},
|
||||
|
||||
/************** Directional Pad *******************/
|
||||
new ButtonSchema(51, 124, controller, "N")
|
||||
{
|
||||
Icon = Properties.Resources.BlueUp
|
||||
|
@ -177,7 +111,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Icon = Properties.Resources.BlueDown
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -188,78 +122,45 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = $"Player {controller}",
|
||||
Size = new Size(280, 332),
|
||||
Buttons = new[]
|
||||
Buttons = StandardButtons(controller).Concat(new[]
|
||||
{
|
||||
new ButtonSchema(91, 15, controller, "Key 1")
|
||||
{
|
||||
DisplayName = "1"
|
||||
},
|
||||
new ButtonSchema(117, 15, controller, "Key 2")
|
||||
{
|
||||
DisplayName = "2"
|
||||
},
|
||||
new ButtonSchema(143, 15, controller, "Key 3")
|
||||
{
|
||||
DisplayName = "3"
|
||||
},
|
||||
new ButtonSchema(91, 41, controller, "Key 4")
|
||||
{
|
||||
DisplayName = "4"
|
||||
},
|
||||
new ButtonSchema(117, 41, controller, "Key 5")
|
||||
{
|
||||
DisplayName = "5"
|
||||
},
|
||||
new ButtonSchema(143, 41, controller, "Key 6")
|
||||
{
|
||||
DisplayName = "6"
|
||||
},
|
||||
new ButtonSchema(91, 67, controller, "Key 7")
|
||||
{
|
||||
DisplayName = "7"
|
||||
},
|
||||
new ButtonSchema(117, 67, controller, "Key 8")
|
||||
{
|
||||
DisplayName = "8"
|
||||
},
|
||||
new ButtonSchema(143, 67, controller, "Key 9")
|
||||
{
|
||||
DisplayName = "9"
|
||||
},
|
||||
new ButtonSchema(91, 93, controller, "Clear")
|
||||
{
|
||||
DisplayName = "C"
|
||||
},
|
||||
new ButtonSchema(117, 93, controller, "Key 0")
|
||||
{
|
||||
DisplayName = "0"
|
||||
},
|
||||
new ButtonSchema(143, 93, controller, "Enter")
|
||||
{
|
||||
DisplayName = "E"
|
||||
},
|
||||
new ButtonSchema(68, 41, controller, "Top")
|
||||
{
|
||||
DisplayName = "T"
|
||||
},
|
||||
new ButtonSchema(166, 41, controller, "Top")
|
||||
{
|
||||
DisplayName = "T"
|
||||
},
|
||||
new ButtonSchema(68, 67, controller, "L")
|
||||
{
|
||||
DisplayName = "L"
|
||||
},
|
||||
new ButtonSchema(166, 67, controller, "R")
|
||||
{
|
||||
DisplayName = "R"
|
||||
},
|
||||
new AnalogSchema(1, 121, $"P{controller} Disc X")
|
||||
{
|
||||
AxisRange = controllerDefRanges[0],
|
||||
SecondaryAxisRange = controllerDefRanges[1]
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<ButtonSchema> StandardButtons(int controller)
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
Key(25, 15, controller , 1),
|
||||
Key(51, 15, controller, 2),
|
||||
Key(77, 15, controller, 3),
|
||||
Key(25, 41, controller, 4),
|
||||
Key(51, 41, controller, 5),
|
||||
Key(77, 41, controller, 6),
|
||||
Key(25, 67, controller, 7),
|
||||
Key(51, 67, controller, 8),
|
||||
Key(77, 67, controller, 9),
|
||||
new ButtonSchema(25, 93, controller, "Clear") { DisplayName = "C" },
|
||||
Key(51, 93, controller, 0),
|
||||
new ButtonSchema(77, 93, controller, "Enter") { DisplayName = "E" },
|
||||
new ButtonSchema(2, 41, controller, "Top") { DisplayName = "T" },
|
||||
new ButtonSchema(100, 41, controller, "Top") { DisplayName = "T" },
|
||||
new ButtonSchema(2, 67, controller, "L") { DisplayName = "L" },
|
||||
new ButtonSchema(100, 67, controller, "R") { DisplayName = "R" }
|
||||
};
|
||||
}
|
||||
|
||||
private static ButtonSchema Key(int x, int y, int controller, int button)
|
||||
{
|
||||
return new ButtonSchema(x, y, controller, $"Key {button}")
|
||||
{
|
||||
DisplayName = button.ToString()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,23 +10,11 @@ namespace BizHawk.Client.EmuHawk.tools.VirtualPads.schema
|
|||
{
|
||||
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)
|
||||
{
|
||||
yield return ControllerButtons();
|
||||
yield return Controller();
|
||||
yield return Console();
|
||||
}
|
||||
|
||||
private static PadSchema Console()
|
||||
{
|
||||
return new ConsoleSchema
|
||||
{
|
||||
Size = new Size(60, 45),
|
||||
Buttons = new []
|
||||
{
|
||||
new ButtonSchema(8, 18, "Lid")
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static PadSchema ControllerButtons()
|
||||
private static PadSchema Controller()
|
||||
{
|
||||
return new PadSchema
|
||||
{
|
||||
|
@ -55,5 +43,17 @@ namespace BizHawk.Client.EmuHawk.tools.VirtualPads.schema
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static PadSchema Console()
|
||||
{
|
||||
return new ConsoleSchema
|
||||
{
|
||||
Size = new Size(60, 45),
|
||||
Buttons = new []
|
||||
{
|
||||
new ButtonSchema(8, 18, "Lid")
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public IEnumerable<PadSchema> GetPadSchemas(IEmulator core)
|
||||
{
|
||||
yield return StandardController();
|
||||
yield return Controller();
|
||||
yield return ConsoleButtons();
|
||||
}
|
||||
|
||||
private static PadSchema StandardController()
|
||||
private static PadSchema Controller()
|
||||
{
|
||||
return new PadSchema
|
||||
{
|
||||
|
|
|
@ -54,14 +54,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
ButtonSchema.Right(44, 39, controller),
|
||||
new ButtonSchema(74, 17, controller, "Mode 1"),
|
||||
new ButtonSchema(74, 40, controller, "Mode 2"),
|
||||
new ButtonSchema(77, 63, controller, "Select")
|
||||
{
|
||||
DisplayName = "s"
|
||||
},
|
||||
new ButtonSchema(101, 63, controller, "Run")
|
||||
{
|
||||
DisplayName = "R"
|
||||
},
|
||||
new ButtonSchema(77, 63, controller, "Select") { DisplayName = "s" },
|
||||
new ButtonSchema(101, 63, controller, "Run") { DisplayName = "R" },
|
||||
new ButtonSchema(140, 63, controller, "IV"),
|
||||
new ButtonSchema(166, 53, controller, "V"),
|
||||
new ButtonSchema(192, 43, controller, "VI"),
|
||||
|
|
|
@ -30,14 +30,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
ButtonSchema.Right(24, 34, controller),
|
||||
new ButtonSchema(122, 34, controller, "B"),
|
||||
new ButtonSchema(146, 34, controller, "A"),
|
||||
new ButtonSchema(52, 34, controller, "Select")
|
||||
{
|
||||
DisplayName = "s"
|
||||
},
|
||||
new ButtonSchema(74, 34, controller, "Start")
|
||||
{
|
||||
DisplayName = "S"
|
||||
}
|
||||
new ButtonSchema(52, 34, controller, "Select") { DisplayName = "s" },
|
||||
new ButtonSchema(74, 34, controller, "Start") { DisplayName = "S" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -162,7 +162,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = "Super Scope",
|
||||
Size = new Size(356, 290),
|
||||
MaxSize = new Size(356, 290),
|
||||
Buttons = new[]
|
||||
{
|
||||
new TargetedPairSchema(14, 17, $"P{controller} Scope X")
|
||||
|
@ -183,7 +182,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = "Justifier",
|
||||
Size = new Size(356, 290),
|
||||
MaxSize = new Size(356, 290),
|
||||
Buttons = new[]
|
||||
{
|
||||
new TargetedPairSchema(14, 17, $"P{controller} Justifier X")
|
||||
|
|
|
@ -24,7 +24,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = $"Joystick {controller}",
|
||||
Size = new Size(174, 74),
|
||||
MaxSize = new Size(174, 74),
|
||||
Buttons = new[]
|
||||
{
|
||||
ButtonSchema.Up(23, 15, controller),
|
||||
|
@ -177,7 +176,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = "DATACORDER",
|
||||
Size = new Size(174, 74),
|
||||
MaxSize = new Size(174, 74),
|
||||
Buttons = new[]
|
||||
{
|
||||
new ButtonSchema(23, 22, "Play Tape")
|
||||
|
|
Loading…
Reference in New Issue