mwg API
    Preparing search index...

    Variable themeChangedConst

    themeChanged: Signal<Theme> = ...

    Fired with the new theme every time setTheme runs.

    theme() is read once, at construction, by every built-in widget - calling setTheme changes nothing about what is already on screen. A widget that wants to restyle itself for a day/night palette swap or a light/dark toggle subscribes here and reapplies its own style from the value passed in, the same shape i18n's direction already flows into theme.direction from a game's own glue code. Every built-in widget already does this.

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

    themeChanged.add((next) => console.log('theme changed, text colour is now', next.color.text));