Hierarchy

  • ScreenEvents

Properties

disable: (() => void)

Type declaration

    • (): void
    • Called on the screen being disabled.

      Returns void

enable: ((ignoreAnimations) => void)

Type declaration

    • (ignoreAnimations): void
    • Calls on the screen being enabled.

      Parameters

      • ignoreAnimations: boolean

        If the screen should not have an opening animation.

      Returns void

key: ((key, state) => boolean | void)

Type declaration

    • (key, state): boolean | void
    • Calls when the screen receives a key event.

      Parameters

      • key: KeyCode

        The key code

      • state: boolean

        The key's state. (true = down, false = up)

      Returns boolean | void

      Return true to cancel, false to pass through

mouse: ((button, wheelDelta, state) => boolean | void)

Type declaration

    • (button, wheelDelta, state): boolean | void
    • Calls when the screen receives a mouse event.

      Parameters

      • button: MouseButton

        The mouse button

      • wheelDelta: number

        Scrolling direction and magnitude if it's a scroll event (positive = scroll up, negative = scroll down)

      • state: boolean

        The mouse's state (true = down, false = up)

      Returns boolean | void

      Return true to cancel, false to pass through

render: (() => void)

Type declaration

    • (): void
    • Called on every frame; use this to render something arbitrary.

      Returns void

      Note

      This gets called whether the screen is on or off - this may be useful for animations.

Generated using TypeDoc