mwg API
    Preparing search index...

    Class HelpScreen

    A controls-reference or FAQ screen: a list of topics and the body of whichever one is highlighted, over the same ListView/Label a game already builds every other menu from - a recipe, not a new primitive, the way RebindScreen composes ListView rather than inventing its own row widget.

    import { HelpScreen } from '@datamoc/mw_games/two-d/ui';

    const help = new HelpScreen({
    width: 320,
    height: 200,
    topics: [
    { title: 'Movement', body: 'Arrow keys or WASD to move.' },
    { title: 'Combat', body: 'Walk into an enemy to attack it.' },
    ],
    });

    help.handleAction('down'); // highlights "Combat" and shows its body

    Hierarchy

    • Container
      • HelpScreen
    Index
    • Parameters

      • action: string

      Returns boolean

      true when the action was used