Skip to content

Popup

This is an abstract class from which all Popups should inherit. However, you can also make your own implementation of IPopup if necessary.

Extends

Type parameters

T extends Application = Application

Implements

Constructors

new Popup()

new Popup<T>(data?): Popup<T>

Parameters

data?: any

Returns

Popup<T>

Overrides

Container.constructor

Source

src/popup/Popup.ts:48

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

Implementation of

IPopup.blackout

Source

src/popup/Popup.ts:32


childrenEditable

childrenEditable: boolean = true

Inherited from

Container.childrenEditable

Source

src/gameobjects/Container.ts:22


editable

editable: boolean = true

Inherited from

Container.editable

Source

src/gameobjects/Container.ts:21


NAME

static readonly NAME: string = '__Popup'

Source

src/popup/Popup.ts:33


__dill_pixel_top_level_class

static __dill_pixel_top_level_class: boolean = true

Inherited from

Container.__dill_pixel_top_level_class

Source

src/gameobjects/Container.ts:20

Accessors

add

get add(): Add

Returns

Add

Source

src/gameobjects/Container.ts:120


app

get app(): T

Returns

T

Source

src/gameobjects/Container.ts:128


editMode

get editMode(): boolean

set editMode(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Container.ts:107


focusPosition

get focusPosition(): Point

set focusPosition(value): void

Parameters

value: Point

Returns

Point

Source

src/gameobjects/Container.ts:83


focusSize

get focusSize(): Point

set focusSize(value): void

Parameters

value: Point

Returns

Point

Source

src/gameobjects/Container.ts:91


focusable

get focusable(): boolean

set focusable(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Container.ts:99


id

get 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)

Returns

string

Source

src/popup/Popup.ts:54


keyboardToClose

get keyboardToClose(): boolean

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

Returns

boolean

Source

src/popup/Popup.ts:59


make

get make(): typeof Make

Returns

typeof Make

Source

src/gameobjects/Container.ts:124


popupData

get popupData(): any

Returns

any

Source

src/popup/Popup.ts:68


state

get state(): PopupState

This is used to prevent duplicate calls to e.g. hide

Returns

PopupState

Source

src/popup/Popup.ts:64


useAsCaptionTarget

get useAsCaptionTarget(): boolean

set useAsCaptionTarget(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Container.ts:61


voiceover

get voiceover(): string

set voiceover(value): void

Parameters

value: string

Returns

string

Source

src/gameobjects/Container.ts:69

Methods

close()

close(): void

Returns

void

Source

src/popup/Popup.ts:130


destroy()

destroy(options?): void

Parameters

options?: boolean | IDestroyOptions

Returns

void

Implementation of

IPopup.destroy

Overrides

Container.destroy

Source

src/popup/Popup.ts:124


disableEditMode()

disableEditMode(): void

Returns

void

Inherited from

Container.disableEditMode

Source

src/gameobjects/Container.ts:173


enableEditMode()

enableEditMode(): void

Returns

void

Inherited from

Container.enableEditMode

Source

src/gameobjects/Container.ts:169


getFocusPosition()

getFocusPosition(): Point

Gets the position in global coordinate space that the focus should be centred around.

Returns

Point

The position that the focus should be centred around.

Inherited from

Container.getFocusPosition

Source

src/gameobjects/Container.ts:157


getFocusSize()

getFocusSize(): IPoint

Gets the size of the area in global coordinate space that the focus should surround.

Returns

IPoint

The size of the area that the focus should surround.

Inherited from

Container.getFocusSize

Source

src/gameobjects/Container.ts:161


hide()

hide(): void

Hide the popup, but only if it’s open

Returns

void

Implementation of

IPopup.hide

Source

src/popup/Popup.ts:73


init()

init(size): void

”Delayed constructor”, this is called before ()

Parameters

size: Point

Screen size, in pixels(?)

Returns

void

Implementation of

IPopup.init

Source

src/popup/Popup.ts:80


isFocusable()

isFocusable(): boolean

Returns

boolean

true if this focusable can be focused Defaults to this.interactive && this.worldVisible

Inherited from

Container.isFocusable

Source

src/gameobjects/Container.ts:165


onFocusActivated()

onFocusActivated(): void

Called when this Focusable is focussed and then activated.

Returns

void

Inherited from

Container.onFocusActivated

Source

src/gameobjects/Container.ts:155


onFocusBegin()

onFocusBegin(): void

Called when this Focusable is focussed.

Returns

void

Inherited from

Container.onFocusBegin

Source

src/gameobjects/Container.ts:143


onFocusEnd()

onFocusEnd(): void

Called when this Focusable is no longer focussed.

Returns

void

Inherited from

Container.onFocusEnd

Source

src/gameobjects/Container.ts:149


onResize()

onResize(size): void

Window resize handler

Parameters

size: Point

Screen size, in pixels(?)

Returns

void

Implementation of

IPopup.onResize

Overrides

Container.onResize

Description

This should be called by PopupManager.onResize

Source

src/popup/Popup.ts:89


show()

show(token): void

Show the popup, and set the close callback You probably want to override animateIn, not show

Parameters

token: IPopupToken

Returns

void

Implementation of

IPopup.show

Source

src/popup/Popup.ts:113


update()

update(_deltaTime): void

Update tick. Needed for some animations. Override this

Parameters

_deltaTime: number

Seconds elapsed since last call to update

Returns

void

Implementation of

IPopup.update

Overrides

Container.update

Source

src/popup/Popup.ts:104