-
Notifications
You must be signed in to change notification settings - Fork 354
Description
If the east/south/north/west patch were accepted, the next iteration would be to include controller-specific button labels.
The idea is to let the user choose from common button label configurations (SNES / XBOX / PSX / etc.) and store this for the specific inputConfig. The HelpComponent icon display should then change the icons according to the button labels of the last used input device.
User presses SNES gamepad -> ABXY. User then picks up the PS3 gamepad which is also connected to Retropie -> Icons change to geometrical shapes.
Step 1 would be to add a label value to inputConfig and make HelpComponent use it.
<input name="a" label="circle" type="button" id="2" value="1" />
<input name="b" label="cross" type="button" id="1" value="1" />
<input name="x" label="triangle" type="button" id="3" value="1" />
<input name="y" label="square" type="button" id="0" value="1" />
Step 2 would be to make HelpComponent change the icons on the fly, based on the last used input device.
Step 3 would be to make the labels user-configurable. At the end of the input configuration for a device, GuiInputConfig could display some standard button label layout variations that the user can choose from.
static const int labelLayoutCount = 6;
static const char* BUTTON_LABEL_LAYOUT[labelLayoutCount][4] {
// Default / Retropad / SNES-button style
// x
// y a
// b
{ "a", "b", "x", "y" },
// XBOX style, a/b and x/y switched positions
{ "b", "a", "y", "x" },
// Sony PSX style, geometric icons
{ "circle", "cross", "triangle", "square" },
// Numbered buttons #1 (Dragonrise etc.)
{ "2", "3", "1", "4" },
// Numbered buttons #2 (Elecom etc.)
{ "4", "3", "2", "1" },
// Numbered buttons #3 (Logitech)
{ "3", "2", "4", "1" }
};
