Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Form<"message">
    • MessageForm

Index

Constructors

Properties

buttons: [Button, Button]

The 2 buttons displayed in the form, listed from top to bottom

text: string

The body text of the message form, this is displayed below the title

title: string

The title of the message form, this is displayed at the top of the window

type: "message"

The type of Form

Methods

  • complete(plr: MBCPlayer, response: MessageFormResponse, onCancel?: ((plr: MBCPlayer) => void)): void
  • createForm(): MessageFormData
  • Sends this message form to a player or array of players

    example
    new MessageForm({
    components: {
    title: 'Example Message Form',
    text: 'Example Body Text',
    buttons: [
    new Button({
    text: 'Accept',
    }),
    new Button({
    text: 'Decline',
    }),
    ]
    }
    }).send(player, (plr, resp) => {
    plr.sendMessage(Debug.format(resp));
    if (resp.sliderId > 100) plr.sendMessage('Slider value is over 100');
    }, (plr) => {
    plr.sendMessage('Closed modal form via cancelation');
    }, (plr) => {
    plr.sendMessage('Modal form timed out, likely due to having an existing ui open upon request');
    });

    Parameters

    Returns void

  • setDef(curr: any, to: any): any

Generated using TypeDoc version 0.22.18, the 7/5/2022