BetaThe player to show this message box to.
The title text to display at the top of the message box.
The body text to display. Accepts either a plain string or an ObservableString.
Sets the body text displayed in the message box. Returns the message box instance to allow method chaining.
This function can't be called in restricted-execution mode.
This function can't be called in early-execution mode.
The text label to display on the first button.
Optionaltooltip: string | ObservableString | ObservableUIRawMessage | UIRawMessageOptional tooltip text shown when hovering over the first button.
Sets the label for the first button of the message box. Returns the message box instance to allow method chaining.
This function can't be called in restricted-execution mode.
This function can't be called in early-execution mode.
The text label to display on the second button.
Optionaltooltip: string | ObservableString | ObservableUIRawMessage | UIRawMessageOptional tooltip text shown when hovering over the second button.
Sets the label for the second button of the message box. Returns the message box instance to allow method chaining.
This function can't be called in restricted-execution mode.
This function can't be called in early-execution mode.
Closes the message box if it is currently being shown to the player. Throws a FormVisibilityError if the form is not currently open.
This function can't be called in restricted-execution mode.
This function can't be called in early-execution mode.
Returns true if the message box is currently being shown to the player, false otherwise.
This function can't be called in restricted-execution mode.
This function can't be called in early-execution mode.
Shows the message box to the player. Returns a promise that resolves with a MessageBoxResult containing the close reason and the player's button selection.
This function can't be called in restricted-execution mode.
This function can't be called in early-execution mode.
A simple message form with two buttons and a text body. Use this class to show a basic dialog to a player and handle the player's button selection.
Example: demo.ts
Source