Show keyboard and mouse icons in the prompts when prompts = keyboard

Add keyboard and mouse button icons to tools/button_icons.py and
tools/make_romfs_patches.py --prompts keyboard, with a third 'Keyboard
and mouse' choice under Controls > Button prompts (prompts = keyboard).

Keycaps cut their labels out of the game's own text fonts, mouse clicks
and right-stick camera look draw clean mouse silhouettes, and
make_romfs_patches.py --ini reads any bind_ overrides from totk.ini.
This commit is contained in:
0xEmz authored and Valiantsin Dzerakh committed 2026-11-04 08:11:06 +03:00
1 parent ff49f6b62f
commit cd35ffaf36
23 files changed
+472 -96

No files matched your search

+10
View File
@@ -303,6 +303,9 @@ int probe_cfg(void) {
"prompts: the game's own unless set to Xbox");
CHECK(input_prompts_pick(NULL, "xbox_prompts") == PROMPTS_XBOX && input_prompts_pick("nintendo", "xbox_prompts") == PROMPTS_NINTENDO,
"prompts: 0.1.9's pad_layout = xbox_prompts means Xbox while prompts is unset");
CHECK(input_prompts_pick("keyboard", "nintendo") == PROMPTS_KEYBOARD &&
input_prompts_pick("Keyboard", "xbox") == PROMPTS_KEYBOARD,
"prompts: keyboard returns PROMPTS_KEYBOARD");
CHECK(!input_prompts_folder(PROMPTS_NINTENDO, "nintendo") && !input_prompts_folder(PROMPTS_NINTENDO, "xbox"),
"prompts: the game's own need no folder");
CHECK(EQ(input_prompts_folder(PROMPTS_XBOX, "nintendo"), "romfs-patches-xbox") &&
@@ -311,6 +314,13 @@ int probe_cfg(void) {
EQ(input_prompts_folder(PROMPTS_XBOX, "auto"), "romfs-patches-xbox-label") &&
EQ(input_prompts_folder(PROMPTS_XBOX, NULL), "romfs-patches-xbox-label"),
"prompts: the face buttons by position for the Nintendo layout, by label for xbox and auto");
CHECK(EQ(input_prompts_folder(PROMPTS_KEYBOARD, "nintendo"), "romfs-patches-keyboard") &&
EQ(input_prompts_folder(PROMPTS_KEYBOARD, "xbox"), "romfs-patches-keyboard") &&
EQ(input_prompts_folder(PROMPTS_KEYBOARD, NULL), "romfs-patches-keyboard"),
"prompts: keyboard prompts use romfs-patches-keyboard for every layout");
const CfgMeta *pmeta = cfg_meta("PROMPTS");
CHECK(pmeta && pmeta->values && strstr(pmeta->values, "keyboard"),
"cfg_meta PROMPTS values include keyboard");
// romfs-patches-xbox shows A as B (tests/romfs_prompts_test.py checks the folders' contents). It is right exactly
// where the layout puts A on the east button, which an Xbox pad labels B.
input_map_reset();