Class CCDialog

A dialog displays a new window on the screen with the specified message.

Constructors

Properties

buttons: string[] = ...

The buttons to display in the window, from left to right.

completionHandler?: (this: void, sender: CCDialog, selection: number) => void

The function to call when the dialog is closed.

defaultButton?: number = 0

The index of the default button.

message: string = "Alert"

The message to display in the window.

title: string = "Alert"

The title for the alert window.

Methods

  • Displays the dialog on screen.

    Parameters

    • Optionalparent: CCWindow

      The parent window of the dialog, if available

    Returns void

  • Displays a single-use dialog with a single "OK" button.

    Parameters

    • parent: undefined | CCWindow

      The parent window to place the dialog under

    • title: string

      The title for the dialog

    • message: string

      The message to show

    • OptionalcompletionHandler: (this: void, sender: CCDialog, selection: number) => void

      A function to call when the dialog is closed

    Returns void