Skip to content

IPopup

Extends

  • DisplayObject

Properties

blackout?

optional blackout: Sprite | Graphics

A full-screen overlay that prevents clicks on things behind the Popup Note that this will not be a child of the Popup

Source

src/popup/IPopup.ts:15


id

readonly id: string

Note that IDs are, for now, shared among all instances of the same type of popup. Typescript quirk: a readonly Field can be implemented as a read-only Property (i.e. a getter)

Source

src/popup/IPopup.ts:9


keyboardToClose

readonly keyboardToClose: boolean

Whether or not to close the popup when the escape key (or Android back button) is pressed

Source

src/popup/IPopup.ts:17

Methods

hide()

hide(): void

Hide the popup. When implementing, make sure to call hidePopupComplete(this) afterwards

Returns

void

Source

src/popup/IPopup.ts:46


init()

init(size): void

”Delayed constructor”, this is called before ()

Parameters

size: Point

Screen size, in pixels(?)

Returns

void

Source

src/popup/IPopup.ts:52


onResize()

onResize(size): void

Window resize handler

Parameters

size: Point

Screen size, in pixels(?)

Returns

void

Description

This should be called by PopupManager.onResize

Source

src/popup/IPopup.ts:31


show()

show(token): void

Show the popup, and set the close callback

Parameters

token: IPopupToken

Returns

void

Source

src/popup/IPopup.ts:40


update()

update(deltaTime): void

Update tick. Needed for some animations.

Parameters

deltaTime: number

Seconds elapsed since last call to update()

Returns

void

Description

This should be called by PopupManager.update

Source

src/popup/IPopup.ts:24