mwg API
    Preparing search index...

    Class OnScreenKeyboard

    An on-screen keyboard: rows of keys as data, rendered through the theme's own Button, each tap pressing its key through pressKey - dispatchText for a typing key, dispatchAction for an action key - so a TextPrompt (or any listener of onText/onAction) cannot tell the tap from a physical key press. Pointer-only devices get a way to type; nothing game-specific lives here.

    import { OnScreenKeyboard, UPPERCASE_KEYBOARD } from '@datamoc/mwg/two-d/ui';
    import type { Container2D } from '@datamoc/mwg/two-d/render';

    declare const layer: Container2D;

    const keyboard = new OnScreenKeyboard(UPPERCASE_KEYBOARD, { width: 320 });
    keyboard.x = 20;
    keyboard.y = 240;
    layer.addChild(keyboard);
    // taps type through core.Input, exactly like a physical key

    Hierarchy

    • Container
      • OnScreenKeyboard
    Index