virtualpads - add another constructor overload to simplify schema classes more

This commit is contained in:
adelikat 2020-07-23 17:42:36 -05:00
parent 6b921c91fb
commit 39424891b4
23 changed files with 118 additions and 297 deletions

View File

@ -55,7 +55,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(23, 36, controller),
ButtonSchema.Left(2, 24, controller),
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(124, 24, controller, "Button") { DisplayName = "B" }
new ButtonSchema(124, 24, controller, "Button", "B")
}
};
}
@ -68,14 +68,8 @@ namespace BizHawk.Client.EmuHawk
Size = new Size(334, 94),
Buttons = new PadSchemaControl[]
{
new ButtonSchema(5, 24, controller, "Button 1")
{
DisplayName = "B1"
},
new ButtonSchema(5, 48, controller, "Button 2")
{
DisplayName = "B2"
},
new ButtonSchema(5, 24, controller, "Button 1", "B1"),
new ButtonSchema(5, 48, controller, "Button 2", "B2"),
new SingleAxisSchema(55, 17, controller, "Paddle X 1")
{
TargetSize = new Size(128, 69),
@ -104,9 +98,9 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(23, 36, controller),
ButtonSchema.Left(2, 24, controller),
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(132, 24, controller, "Button") { DisplayName = "B" },
new ButtonSchema(68, 36, controller, "Button 1") { DisplayName = "B1" },
new ButtonSchema(100, 36, controller, "Button 2") { DisplayName = "B2" }
new ButtonSchema(132, 24, controller, "Button", "B"),
new ButtonSchema(68, 36, controller, "Button 1", "B1"),
new ButtonSchema(100, 36, controller, "Button 2", "B2")
}
};
}
@ -119,10 +113,7 @@ namespace BizHawk.Client.EmuHawk
Size = new Size(334, 94),
Buttons = new PadSchemaControl[]
{
new ButtonSchema(5, 24, controller, "Button")
{
DisplayName = "B1"
},
new ButtonSchema(5, 24, controller, "Button", "B1"),
new SingleAxisSchema(55, 17, controller, "Wheel X 1")
{
TargetSize = new Size(128, 69),

View File

@ -66,7 +66,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(23, 36, controller),
ButtonSchema.Left(2, 24, controller),
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(120, 24, controller, "Button") { DisplayName = "1" }
new ButtonSchema(120, 24, controller, "Button", "1")
}
};
}
@ -83,8 +83,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", "1"),
new ButtonSchema(145, 24, controller, "Trigger 2", "2")
}
};
}

View File

@ -28,7 +28,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(23, 36, controller),
ButtonSchema.Left(2, 24, controller),
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(124, 24, controller, "Button") { DisplayName = "B" }
new ButtonSchema(124, 24, controller, "Button", "B")
}
};
}

View File

@ -103,9 +103,9 @@ namespace BizHawk.Client.EmuHawk
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(27, 154, controller, "Star", "*"),
new ButtonSchema(50, 154, controller, "0"),
new ButtonSchema(73, 154, controller, "Pound") { DisplayName = "#" }
new ButtonSchema(73, 154, controller, "Pound", "#")
};
}
}

View File

@ -28,8 +28,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", "s"),
new ButtonSchema(74, 34, controller, "Start", "S")
}
};
}

View File

@ -75,8 +75,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", "s"),
new ButtonSchema(74, 34, controller, "Start", "S")
}
};
}

View File

@ -26,9 +26,9 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(14, 56, controller),
ButtonSchema.Left(2, 34, controller),
ButtonSchema.Right(24, 34, controller),
new ButtonSchema(134, 12, controller, "Start") { DisplayName = "S" },
new ButtonSchema(122, 34, controller, "B1") { DisplayName = "1" },
new ButtonSchema(146, 34, controller, "B2") { DisplayName = "2" }
new ButtonSchema(134, 12, controller, "Start", "S"),
new ButtonSchema(122, 34, controller, "B1", "1"),
new ButtonSchema(146, 34, controller, "B2", "2")
}
};
}

View File

@ -101,7 +101,7 @@ namespace BizHawk.Client.EmuHawk
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" }
new ButtonSchema(122, 12, controller, "Start", "S")
};
}
@ -117,14 +117,8 @@ namespace BizHawk.Client.EmuHawk
{
TargetSize = new Size(320, 240)
},
new ButtonSchema(284, 17, controller, "Lightgun Trigger")
{
DisplayName = "Trigger"
},
new ButtonSchema(284, 40, controller, "Lightgun Start")
{
DisplayName = "Start"
}
new ButtonSchema(284, 17, controller, "Lightgun Trigger", "Trigger"),
new ButtonSchema(284, 40, controller, "Lightgun Start", "Start")
}
};
}
@ -142,22 +136,10 @@ namespace BizHawk.Client.EmuHawk
// MaxValue = 255,
// TargetSize = new Size(520, 570)
},
new ButtonSchema(365, 17, controller, "Mouse Left")
{
DisplayName = "Left"
},
new ButtonSchema(365, 40, controller, "Mouse Center")
{
DisplayName = "Center"
},
new ButtonSchema(365, 63, "Mouse Right")
{
DisplayName = "Right"
},
new ButtonSchema(365, 86, "Mouse Start")
{
DisplayName = "Start"
}
new ButtonSchema(365, 17, controller, "Mouse Left", "Left"),
new ButtonSchema(365, 40, controller, "Mouse Center", "Center"),
new ButtonSchema(365, 63, controller, "Mouse Right", "Right"),
new ButtonSchema(365, 86, controller, "Mouse Start", "Start")
}
};
}
@ -207,8 +189,8 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(122, 40, controller, "B"),
new ButtonSchema(146, 40, controller, "C"),
new ButtonSchema(98, 65, controller, "D"),
new ButtonSchema(122, 65, controller, "E1") { DisplayName = "E¹" },
new ButtonSchema(152, 65, controller, "E2") { DisplayName = "E²" },
new ButtonSchema(122, 65, controller, "E1", "E¹"),
new ButtonSchema(152, 65, controller, "E2", "E²"),
new ButtonSchema(122, 12, controller, "Start"),
new ButtonSchema(162, 12, controller, "Select")
}

View File

@ -99,13 +99,13 @@ namespace BizHawk.Client.EmuHawk
Key(25, 67, controller, 7),
Key(51, 67, controller, 8),
Key(77, 67, controller, 9),
new ButtonSchema(25, 93, controller, "Clear") { DisplayName = "C" },
new ButtonSchema(25, 93, controller, "Clear", "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" }
new ButtonSchema(77, 93, controller, "Enter", "E"),
new ButtonSchema(2, 41, controller, "Top", "T"),
new ButtonSchema(100, 41, controller, "Top", "T"),
new ButtonSchema(2, 67, controller, "L"),
new ButtonSchema(100, 67, controller, "R")
};
}

View File

@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(3, 185, controller, "L"),
new ButtonSchema(191, 185, controller, "R"),
new ButtonSchema(81, 269, controller, "Z"),
new ButtonSchema(81, 246, controller, "Start") { DisplayName = "S" },
new ButtonSchema(81, 246, controller, "Start", "S"),
new ButtonSchema(127, 246, controller, "B"),
new ButtonSchema(138, 269, controller, "A"),
new ButtonSchema(173, 210, controller, "C Up")

View File

@ -220,8 +220,8 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(124, 24, controller, "B"),
new ButtonSchema(147, 24, controller, "A"),
new ButtonSchema(72, 24, controller, "Select") { DisplayName = "s" },
new ButtonSchema(93, 24, controller, "Start") { DisplayName = "S" }
new ButtonSchema(72, 24, controller, "Select", "s"),
new ButtonSchema(93, 24, controller, "Start", "S")
}
};
}
@ -241,7 +241,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(124, 24, controller, "B"),
new ButtonSchema(147, 24, controller, "A"),
new ButtonSchema(72, 24, controller, "Microphone") { DisplayName = "Mic" }
new ButtonSchema(72, 24, controller, "Microphone", "Mic")
}
};
}
@ -340,38 +340,14 @@ namespace BizHawk.Client.EmuHawk
Size = new Size(560, 180),
Buttons = new[]
{
new ButtonSchema(23, 15, controller, "F1")
{
DisplayName = " F1 "
},
new ButtonSchema(76, 15, controller, "F2")
{
DisplayName = " F2 "
},
new ButtonSchema(129, 15, controller, "F3")
{
DisplayName = " F3 "
},
new ButtonSchema(182, 15, controller, "F4")
{
DisplayName = " F4 "
},
new ButtonSchema(235, 15, controller, "F5")
{
DisplayName = " F5 "
},
new ButtonSchema(288, 15, controller, "F6")
{
DisplayName = " F6 "
},
new ButtonSchema(341, 15, controller, "F7")
{
DisplayName = " F7 "
},
new ButtonSchema(394, 15, controller, "F8")
{
DisplayName = " F8 "
},
new ButtonSchema(23, 15, controller, "F1", " F1 "),
new ButtonSchema(76, 15, controller, "F2", " F2 "),
new ButtonSchema(129, 15, controller, "F3", " F3 "),
new ButtonSchema(182, 15, controller, "F4", " F4 "),
new ButtonSchema(235, 15, controller, "F5", " F5 "),
new ButtonSchema(288, 15, controller, "F6", " F6 "),
new ButtonSchema(341, 15, controller, "F7", " F7 "),
new ButtonSchema(394, 15, controller, "F8", " F8 "),
new ButtonSchema(36, 38, controller, "1"),
new ButtonSchema(60, 38, controller, "2"),
new ButtonSchema(84, 38, controller, "3"),
@ -382,26 +358,11 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(204, 38, controller, "8"),
new ButtonSchema(228, 38, controller, "9"),
new ButtonSchema(252, 38, controller, "0"),
new ButtonSchema(276, 38, controller, "Minus")
{
DisplayName = "-"
},
new ButtonSchema(296, 38, controller, "Caret")
{
DisplayName = "^"
},
new ButtonSchema(320, 38, controller, "Yen")
{
DisplayName = "¥"
},
new ButtonSchema(344, 38, controller, "Stop")
{
DisplayName = "STOP"
},
new ButtonSchema(15, 61, controller, "Escape")
{
DisplayName = "ESC"
},
new ButtonSchema(276, 38, controller, "Minus", "-"),
new ButtonSchema(296, 38, controller, "Caret", "^"),
new ButtonSchema(320, 38, controller, "Yen", "¥"),
new ButtonSchema(344, 38, controller, "Stop", "STOP"),
new ButtonSchema(15, 61, controller, "Escape", "ESC"),
new ButtonSchema(54, 61, controller, "Q"),
new ButtonSchema(80, 61, controller, "W"),
new ButtonSchema(108, 61, controller, "E"),
@ -412,22 +373,10 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(232, 61, controller, "I"),
new ButtonSchema(252, 61, controller, "O"),
new ButtonSchema(278, 61, controller, "P"),
new ButtonSchema(302, 61, controller, "At")
{
DisplayName = "@"
},
new ButtonSchema(330, 61, controller, "Left Bracket")
{
DisplayName = "["
},
new ButtonSchema(350, 61, controller, "Return")
{
DisplayName = "RETURN"
},
new ButtonSchema(30, 84, controller, "Control")
{
DisplayName = "CTR"
},
new ButtonSchema(302, 61, controller, "At", "@"),
new ButtonSchema(330, 61, controller, "Left Bracket", "["),
new ButtonSchema(350, 61, controller, "Return", "RETURN"),
new ButtonSchema(30, 84, controller, "Control", "CTR"),
new ButtonSchema(70, 84, controller, "A"),
new ButtonSchema(94, 84, controller, "S"),
new ButtonSchema(118, 84, controller, "D"),
@ -437,26 +386,11 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(220, 84, controller, "J"),
new ButtonSchema(242, 84, controller, "K"),
new ButtonSchema(266, 84, controller, "L"),
new ButtonSchema(290, 84, controller, "Semicolon")
{
DisplayName = ";"
},
new ButtonSchema(311, 84, controller, "Colon")
{
DisplayName = ":"
},
new ButtonSchema(332, 84, controller, "Right Bracket")
{
DisplayName = "]"
},
new ButtonSchema(352, 84, controller, "カナ")
{
DisplayName = "カナ"
},
new ButtonSchema(10, 107, controller, "Left Shift")
{
DisplayName = "SHIFT"
},
new ButtonSchema(290, 84, controller, "Semicolon", ";"),
new ButtonSchema(311, 84, controller, "Colon", ":"),
new ButtonSchema(332, 84, controller, "Right Bracket", "]"),
new ButtonSchema(352, 84, controller, "カナ"),
new ButtonSchema(10, 107, controller, "Left Shift", "SHIFT"),
new ButtonSchema(58, 107, controller, "Z"),
new ButtonSchema(82, 107, controller, "X"),
new ButtonSchema(106, 107, controller, "C"),
@ -464,62 +398,20 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(154, 107, controller, "B"),
new ButtonSchema(178, 107, controller, "N"),
new ButtonSchema(203, 107, controller, "M"),
new ButtonSchema(229, 107, controller, "Comma")
{
DisplayName = ","
},
new ButtonSchema(249, 107, controller, "Period")
{
DisplayName = "."
},
new ButtonSchema(270, 107, controller, "Slash")
{
DisplayName = "/"
},
new ButtonSchema(292, 107, controller, "Underscore")
{
DisplayName = "_"
},
new ButtonSchema(316, 107, controller, "Right Shift")
{
DisplayName = "SHIFT"
},
new ButtonSchema(82, 130, controller, "Graph")
{
DisplayName = "GRPH"
},
new ButtonSchema(130, 130, controller, "Space")
{
DisplayName = " SPACE "
},
new ButtonSchema(420, 46, controller, "Clear/Home")
{
DisplayName = " CLR\nHOME"
},
new ButtonSchema(470, 46, controller, "Insert")
{
DisplayName = "\nINS"
},
new ButtonSchema(506, 46, controller, "Delete")
{
DisplayName = "\nDEL"
},
new ButtonSchema(468, 86, controller, "Up")
{
DisplayName = " ↑ "
},
new ButtonSchema(468, 134, controller, "Down")
{
DisplayName = " ↓ "
},
new ButtonSchema(446, 110, controller, "Left")
{
DisplayName = " ← "
},
new ButtonSchema(488, 110, controller, "Right")
{
DisplayName = " ➝ "
}
new ButtonSchema(229, 107, controller, "Comma", ","),
new ButtonSchema(249, 107, controller, "Period", "."),
new ButtonSchema(270, 107, controller, "Slash", "/"),
new ButtonSchema(292, 107, controller, "Underscore", "_"),
new ButtonSchema(316, 107, controller, "Right Shift", "SHIFT"),
new ButtonSchema(82, 130, controller, "Graph", "GRPH"),
new ButtonSchema(130, 130, controller, "Space", " SPACE "),
new ButtonSchema(420, 46, controller, "Clear/Home", " CLR\nHOME"),
new ButtonSchema(470, 46, controller, "Insert", "\nINS"),
new ButtonSchema(506, 46, controller, "Delete", "\nDEL"),
new ButtonSchema(468, 86, controller, "Up", " ↑ "),
new ButtonSchema(468, 134, controller, "Down", " ↓ "),
new ButtonSchema(446, 110, controller, "Left", " ← "),
new ButtonSchema(488, 110, controller, "Right", " ➝ ")
}
};
}

View File

@ -28,7 +28,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Right(24, 34, 1),
new ButtonSchema(74, 34, 1, "B"),
new ButtonSchema(98, 34, 1, "A"),
new ButtonSchema(146, 12, 1, "Option") { DisplayName = "O" }
new ButtonSchema(146, 12, 1, "Option", "O")
}
};
}

View File

@ -79,14 +79,8 @@ namespace BizHawk.Client.EmuHawk
{
Icon = Properties.Resources.Cross
},
new ButtonSchema(112, 62, controller, "Start")
{
DisplayName = "S"
},
new ButtonSchema(90, 62, controller, "Select")
{
DisplayName = "s"
},
new ButtonSchema(112, 62, controller, "Start", "S"),
new ButtonSchema(90, 62, controller, "Select", "s"),
new AnalogSchema(3, 120, $"P{controller} LStick X")
{
Spec = stickRanges[0],
@ -133,14 +127,8 @@ namespace BizHawk.Client.EmuHawk
{
Icon = Properties.Resources.Cross
},
new ButtonSchema(112, 67, controller, "Start")
{
DisplayName = "S"
},
new ButtonSchema(90, 67, controller, "Select")
{
DisplayName = "s"
}
new ButtonSchema(112, 67, controller, "Start", "S"),
new ButtonSchema(90, 67, controller, "Select", "s")
}
};
}
@ -157,7 +145,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(36, 104, controller),
ButtonSchema.Left(15, 95, controller),
ButtonSchema.Right(57, 95, controller),
new ButtonSchema(78, 118, controller, "Start") { DisplayName = "S" },
new ButtonSchema(78, 118, controller, "Start", "S"),
new ButtonSchema(278, 38, controller, "B"),
new ButtonSchema(308, 55, controller, "A"),
new ButtonSchema(308, 15, controller, "R"),

View File

@ -36,6 +36,10 @@ namespace BizHawk.Client.EmuHawk
: base(new Point(x, y), $"P{controller} {name}")
=> DisplayName = name;
public ButtonSchema(int x, int y, int controller, string name, string displayName)
: this(x, y, controller, name)
=> DisplayName = displayName;
public static ButtonSchema Up(int x, int y, string? name = null)
=> new ButtonSchema(x, y, name ?? "Up") { Icon = Resources.BlueUp };

View File

@ -75,22 +75,10 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(14, 56, controller),
ButtonSchema.Left(2, 34, controller),
ButtonSchema.Right(24, 34, controller),
new ButtonSchema(122, 34, controller, "B2")
{
DisplayName = "II"
},
new ButtonSchema(146, 34, controller, "B1")
{
DisplayName = "I"
},
new ButtonSchema(52, 34, controller, "Select")
{
DisplayName = "s"
},
new ButtonSchema(74, 34, controller, "Run")
{
DisplayName = "R"
}
new ButtonSchema(122, 34, controller, "B2", "II"),
new ButtonSchema(146, 34, controller, "B1", "I"),
new ButtonSchema(52, 34, controller, "Select", "s"),
new ButtonSchema(74, 34, controller, "Run", "R")
}
};
}
@ -129,16 +117,16 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(14, 56, controller),
ButtonSchema.Left(2, 34, controller),
ButtonSchema.Right(24, 34, controller),
new ButtonSchema(77, 17, controller, "Mode: Set 2-button") { DisplayName = "2 Btn" },
new ButtonSchema(77, 40, controller, "Mode: Set 6-button") { DisplayName = "6 Btn" },
new ButtonSchema(77, 17, controller, "Mode: Set 2-button", "2 Btn"),
new ButtonSchema(77, 40, controller, "Mode: Set 6-button", "6 Btn"),
new ButtonSchema(140, 63, controller, "IV"),
new ButtonSchema(166, 53, controller, "V"),
new ButtonSchema(192, 43, controller, "VI"),
new ButtonSchema(140, 40, controller, "I"),
new ButtonSchema(166, 30, controller, "II"),
new ButtonSchema(192, 20, controller, "III"),
new ButtonSchema(77, 63, controller, "Select") { DisplayName = "s" },
new ButtonSchema(101, 63, controller, "Run") { DisplayName = "R" }
new ButtonSchema(77, 63, controller, "Select", "s"),
new ButtonSchema(101, 63, controller, "Run", "R")
}
};
}

View File

@ -53,18 +53,18 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(14, 56, controller),
ButtonSchema.Left(2, 34, controller),
ButtonSchema.Right(24, 34, controller),
new ButtonSchema(72, 17, controller, "Mode 1: Set A") { DisplayName = "1A" },
new ButtonSchema(72, 40, controller, "Mode 2: Set A") { DisplayName = "2A" },
new ButtonSchema(102, 17, controller, "Mode 1: Set B") { DisplayName = "1B" },
new ButtonSchema(102, 40, controller, "Mode 2: Set B") { DisplayName = "2B" },
new ButtonSchema(72, 17, controller, "Mode 1: Set A", "1A"),
new ButtonSchema(72, 40, controller, "Mode 2: Set A", "2A"),
new ButtonSchema(102, 17, controller, "Mode 1: Set B", "1B"),
new ButtonSchema(102, 40, controller, "Mode 2: Set B", "2B"),
new ButtonSchema(140, 63, controller, "IV"),
new ButtonSchema(166, 53, controller, "V"),
new ButtonSchema(192, 43, controller, "VI"),
new ButtonSchema(140, 40, controller, "I"),
new ButtonSchema(166, 30, controller, "II"),
new ButtonSchema(192, 20, controller, "III"),
new ButtonSchema(77, 63, controller, "Select") { DisplayName = "s" },
new ButtonSchema(101, 63, controller, "Run") { DisplayName = "R" }
new ButtonSchema(77, 63, controller, "Select", "s"),
new ButtonSchema(101, 63, controller, "Run", "R")
}
};
}

View File

@ -30,8 +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", "s"),
new ButtonSchema(74, 34, controller, "Start", "S")
}
};
}

View File

@ -69,7 +69,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(34, 61, controller),
ButtonSchema.Left(22, 39, controller),
ButtonSchema.Right(44, 39, controller),
new ButtonSchema(78, 52, controller, "Start") { DisplayName = "S" },
new ButtonSchema(78, 52, controller, "Start", "S"),
new ButtonSchema(110, 63, controller, "A"),
new ButtonSchema(134, 53, controller, "B"),
new ButtonSchema(158, 43, controller, "C"),
@ -93,7 +93,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(290, 121, $"P{controller} D-Pad Down"),
ButtonSchema.Left(278, 99, $"P{controller} D-Pad Left"),
ButtonSchema.Right(300, 99, $"P{controller} D-Pad Right"),
new ButtonSchema(334, 112, controller, "Start") { DisplayName = "S" },
new ButtonSchema(334, 112, controller, "Start", "S"),
new ButtonSchema(366, 123, controller, "A"),
new ButtonSchema(390, 113, controller, "B"),
new ButtonSchema(414, 103, controller, "C"),
@ -137,18 +137,9 @@ namespace BizHawk.Client.EmuHawk
SecondaryName = $"P{controller} Motion Up / Down",
TargetSize = new Size(256, 256)
},
new ButtonSchema(300, 17, controller, "Left Button")
{
DisplayName = "Left"
},
new ButtonSchema(300, 47, controller, "Middle Button")
{
DisplayName = "Middle"
},
new ButtonSchema(300, 77, controller, "Right Button")
{
DisplayName = "Right"
},
new ButtonSchema(300, 17, controller, "Left Button", "Left"),
new ButtonSchema(300, 47, controller, "Middle Button", "Middle"),
new ButtonSchema(300, 77, controller, "Right Button", "Right"),
new ButtonSchema(300, 107, controller, "Start")
}
};
@ -280,10 +271,7 @@ namespace BizHawk.Client.EmuHawk
},
new ButtonSchema(300, 17, controller, "Trigger"),
new ButtonSchema(300, 57, controller, "Start"),
new ButtonSchema(300, 290, controller, "Offscreen Shot")
{
DisplayName = "Offscreen"
}
new ButtonSchema(300, 290, controller, "Offscreen Shot", "Offscreen")
}
};
}

View File

@ -40,11 +40,11 @@ namespace BizHawk.Client.EmuHawk
yield return ButtonSchema.Down(14, 56, controller);
yield return ButtonSchema.Left(2, 34, controller);
yield return ButtonSchema.Right(24, 34, controller);
yield return new ButtonSchema(122, 34, controller, "B1") { DisplayName = "1" };
yield return new ButtonSchema(146, 34, controller, "B2") { DisplayName = "2" };
yield return new ButtonSchema(122, 34, controller, "B1", "1");
yield return new ButtonSchema(146, 34, controller, "B2", "2");
if (!isSms)
{
yield return new ButtonSchema(134, 12, controller, "Start") { DisplayName = "S" };
yield return new ButtonSchema(134, 12, controller, "Start", "S");
}
}

View File

@ -147,8 +147,8 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Right(44, 39, controller),
new ButtonSchema(2, 10, controller, "L"),
new ButtonSchema(174, 10, controller, "R"),
new ButtonSchema(70, 39, controller, "Select") { DisplayName = "s" },
new ButtonSchema(92, 39, controller, "Start") { DisplayName = "S" },
new ButtonSchema(70, 39, controller, "Select", "s"),
new ButtonSchema(92, 39, controller, "Start", "S"),
new ButtonSchema(121, 39, controller, "Y"),
new ButtonSchema(145, 52, controller, "B"),
new ButtonSchema(122, 15, controller, "X"),
@ -170,14 +170,8 @@ namespace BizHawk.Client.EmuHawk
Spec = defAxes.SpecAtIndex(0),
SecondarySpec = defAxes.SpecAtIndex(1)
},
new ButtonSchema(275, 15, controller, "Mouse Left")
{
DisplayName = "Left"
},
new ButtonSchema(275, 45, controller, "Mouse Right")
{
DisplayName = "Right"
}
new ButtonSchema(275, 15, controller, "Mouse Left", "Left"),
new ButtonSchema(275, 45, controller, "Mouse Right", "Right")
}
};
}

View File

@ -81,10 +81,7 @@ namespace BizHawk.Client.EmuHawk
private static ButtonSchema Button(int x, int y, int controller, int button)
{
return new ButtonSchema(x, y, controller, $"Button {button}")
{
DisplayName = button.ToString()
};
return new ButtonSchema(x, y, controller, $"Button {button}", button.ToString());
}
private static PadSchema ConsoleButtons()

View File

@ -32,7 +32,7 @@ namespace BizHawk.Client.EmuHawk
new ButtonSchema(9, 114, controller, "X4"),
new ButtonSchema(38, 114, controller, "X2"),
new ButtonSchema(23, 136, controller, "X3"),
new ButtonSchema(80, 114, controller, "Start") { DisplayName = "S" },
new ButtonSchema(80, 114, controller, "Start", "S"),
new ButtonSchema(110, 114, controller, "B"),
new ButtonSchema(133, 103, controller, "A")
}
@ -49,7 +49,7 @@ namespace BizHawk.Client.EmuHawk
{
new ButtonSchema(23, 12, controller, "A"),
new ButtonSchema(46, 22, controller, "B"),
new ButtonSchema(32, 58, controller, "Start") { DisplayName = "S" },
new ButtonSchema(32, 58, controller, "Start", "S"),
new ButtonSchema(23, 112, controller, "Y2"),
new ButtonSchema(9, 134, controller, "Y1"),
new ButtonSchema(38, 134, controller, "Y3"),

View File

@ -30,10 +30,7 @@ namespace BizHawk.Client.EmuHawk
ButtonSchema.Down(23, 36, controller),
ButtonSchema.Left(2, 24, controller),
ButtonSchema.Right(44, 24, controller),
new ButtonSchema(124, 24, controller, "Button")
{
DisplayName = "B"
}
new ButtonSchema(124, 24, controller, "Button", "B")
}
};
}