feat: show keyboard keys or the controller's own buttons in the hint bar

The hint bar always named Xbox buttons, so someone at a keyboard was
told to press buttons they did not have, and owners of other pads got
the wrong letters. Hints now name an action, and the keys or button
icons come from the input used last: keyboard, or an Xbox, PlayStation,
Switch or Steam Deck controller.

Behind Steam, every pad is Steam's virtual one. remus reads the file
Steam names in SteamVirtualGamepadInfo to find the physical controller,
matching the slot in the pad's name, as SDL does. Icons are Kenney's
Input Prompts (CC0), with the licence beside them.
This commit is contained in:
Ansho Rei
2026-11-04 10:43:56 +01:00
parent 8255e39047
commit 28a8b8af11
69 changed files with 902 additions and 71 deletions
@@ -0,0 +1,7 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#E73246" d="M56 26 L56 38 Q56 38.85 55.45 39.45 54.85 40 54 40 L44.85 40 Q44 40 43.45 39.45 L37.45 33.45 Q36.85 32.85 36.85 32 36.85 31.15 37.45 30.6 L43.45 24.6 Q44 24 44.85 24 L54 24 Q54.85 24 55.45 24.6 56 25.15 56 26 M19.15 40 L10 40 Q9.15 40 8.6 39.45 8 38.85 8 38 L8 26 Q8 25.15 8.6 24.6 9.15 24 10 24 L19.15 24 Q20 24 20.6 24.6 L26.6 30.6 Q27.15 31.15 27.15 32 27.15 32.85 26.6 33.45 L20.6 39.45 Q20 40 19.15 40"/>
<path stroke="none" fill="#FFFFFF" d="M40 10 L40 19.15 Q40 20 39.45 20.6 L33.45 26.6 Q32.85 27.15 32 27.15 31.15 27.15 30.6 26.6 L24.6 20.6 Q24 20 24 19.15 L24 10 Q24 9.15 24.6 8.6 25.15 8 26 8 L38 8 Q38.85 8 39.45 8.6 40 9.15 40 10 M33.45 37.45 L39.45 43.45 Q40 44 40 44.85 L40 54 Q40 54.85 39.45 55.45 38.85 56 38 56 L26 56 Q25.15 56 24.6 55.45 24 54.85 24 54 L24 44.85 Q24 44 24.6 43.45 L30.6 37.45 Q31.15 36.85 32 36.85 32.85 36.85 33.45 37.45"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB