Class ModalFormData

Used to create a fully customizable pop-up form for a player.

Hierarchy

  • ModalFormData

Constructors

Methods

  • Parameters

    • label: string
    • options: string[]
    • Optional defaultValueIndex: number

    Returns ModalFormData

    Remarks

    Adds a dropdown with choices to the form.

  • Parameters

    • player: Player

      Player to show this dialog to.

    Returns Promise<ModalFormResponse>

    Remarks

    Creates and shows this modal popup form. Returns asynchronously when the player confirms or cancels the dialog.

    Throws

    This function can throw errors.

  • Parameters

    • label: string
    • minimumValue: number
    • maximumValue: number
    • valueStep: number
    • Optional defaultValue: number

    Returns ModalFormData

    Remarks

    Adds a numeric slider to the form.

  • Parameters

    • label: string
    • placeholderText: string
    • Optional defaultValue: string

    Returns ModalFormData

    Remarks

    Adds a textbox to the form.

  • Parameters

    • titleText: string

    Returns ModalFormData

    Remarks

    This builder method sets the title for the modal dialog.

  • Parameters

    • label: string
    • Optional defaultValue: boolean

    Returns ModalFormData

    Remarks

    Adds a toggle checkbox button to the form.