Skip to content

Import input hint component from Threadbare #94

Description

@wjt

In Threadbare we now have a nice little component that dynamically looks up the correct input hint to display. It works like this:

  1. 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?")
  2. Look up the first InputEvent(s) for that device type for a given action (e.g. "move_right")
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions