Hierarchy

Constructors

  • Returns default

Properties

event: IEventEmitter<default, IScreenManagerEvents>
screenWrapper: default<HTMLElement> = ...

Methods

  • Streams all initialized screens.

    Returns Stream<default>

  • Returns a promise that resolves when the given screen is shown.

    Type Parameters

    Parameters

    • screenId: SCREEN

    Returns Promise<ScreenById[SCREEN]>

  • Returns a screen, or undefined, if the screen is not initialized.

    Type Parameters

    Parameters

    • screenId: ID

      The ID of the screen to return

    Returns undefined | ScreenById[ID]

  • Returns the "top" screen.

    There are two screen layers:

    1. The main layer
    2. The overlay layer

    The overlay layer is always in front of the main layer, therefore if there is no overlay screen visible, this method returns the main layer screen. Otherwise, this method returns the overlay layer screen.

    Type Parameters

    Returns S

  • Returns boolean

  • Hides the given screen, or the current screen if none is passed.

    Parameters

    Returns void | Promise<void>

  • If the screen by the given ID is not already initialized, initializes it.

    Returns

    The initialized screen

    Type Parameters

    Parameters

    • screenId: ID

      The ID of the screen to initialize

    Returns ScreenById[ID]

  • Returns boolean

  • Returns if the given screen id is the "top" screen.

    There are two screen layers:

    1. The main layer
    2. The overlay layer

    The overlay layer is always in front of the main layer, therefore if there is no overlay screen visible, this method returns if the given screen ID is the main layer screen. Otherwise, this method returns if the given screen ID is the overlay layer screen.

    Parameters

    Returns boolean

  • Returns if the given screen id is a currently visible screen (either the main screen or the overlay screen).

    Parameters

    Returns boolean

  • Shows a screen

    Type Parameters

    Parameters

    • screenId: ID

      The id of the screen to show

    • Optional screenInitializer: ((screen: ScreenById[ID]) => any)

    Returns ScreenById[ID]

Generated using TypeDoc