In Threadbare we now have a nice little component that dynamically looks up the correct input hint to display. It works like this:
- Track last-used input device (keyboard or gamepad). This bit is outsourced to InputHelper but since the controls are only shown prior to the first input it can be skipped in favour of the current logic ("is a joypad connected?")
- Look up the first InputEvent(s) for that device type for a given action (e.g. "move_right")
- Look up the glyph for that event in a giant atlas, compensating for different keyboard layouts
It might be nice to import this to moddable-platformer.
In Threadbare we now have a nice little component that dynamically looks up the correct input hint to display. It works like this:
It might be nice to import this to moddable-platformer.