mwg API
    Preparing search index...

    Class Spinner

    A small up/down stepper: tap the top half to add one step, the bottom half to take one away. It draws only the arrows; the current value is a Label the game puts beside it, the same split Checkbox and Slider keep from their captions.

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

    const level = new Spinner({ min: 1, max: 99, value: 1 });
    level.increment();
    console.log(level.value); // 2

    Hierarchy

    • Container
      • Spinner
    Index
    onChange: Signal<number> = ...
    • Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

      Parameters

      • Optionaloptions: DestroyOptions

        Options parameter. A boolean will act as if all options have been set to that value

      Returns void

      container.destroy();
      container.destroy(true);
      container.destroy({ children: true });
      container.destroy({ children: true, texture: true, textureSource: true });
    • Parameters

      • width: number
      • height: number

      Returns void