Class: Dialog#

Hierarchy#

Constructors#

constructor#

new Dialog(): Dialog

Returns: Dialog

Defined in: handles/dialog.ts:22

Properties#

handle#

• Readonly handle: dialog

Inherited from: Handle.handle

Defined in: handles/handle.ts:6

Accessors#

id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18

Methods#

addButton#

addButton(text: string, hotkey?: number, quit?: boolean, score?: boolean): DialogButton

Parameters:#

NameTypeDefault value
textstring-
hotkeynumber0
quitbooleanfalse
scorebooleanfalse

Returns: DialogButton

Defined in: handles/dialog.ts:27


clear#

clear(): void

Returns: void

Defined in: handles/dialog.ts:31


destroy#

destroy(): void

Returns: void

Defined in: handles/dialog.ts:35


display#

display(whichPlayer: MapPlayer, flag: boolean): void

note Dialogs can not be shown at map-init. Use a wait or a zero-timer to display as soon as possible.

Parameters:#

NameType
whichPlayerMapPlayer
flagboolean

Returns: void

Defined in: handles/dialog.ts:42


setMessage#

setMessage(whichMessage: string): void

Parameters:#

NameType
whichMessagestring

Returns: void

Defined in: handles/dialog.ts:46


fromHandle#

static fromHandle(handle: dialog): Dialog

Parameters:#

NameType
handledialog

Returns: Dialog

Defined in: handles/dialog.ts:50