A generic application to render a settings modal.

Hierarchy (View Summary)

Constructors

Properties

settings: any
DEFAULT_OPTIONS: {
    actions: { resetForm: (event: Event) => Promise<void> };
    classes: string[];
    form: {
        closeOnSubmit: boolean;
        handler: (
            ...this: any,
            event: SubmitEvent,
            form: HTMLFormElement,
            formData: FormDataExtended,
        ) => Promise<void>;
        submitOnChange: boolean;
        submitOnClose: boolean;
    };
    position: { width: number };
    sheetConfig: boolean;
    tag: string;
    window: { minimizable: boolean; resizable: boolean };
} = ...
settings: any

Accessors

Methods

  • Initialize the configuration for this application. Override the default ID to be unique to this settings app instance and tack on extra class.

    Parameters

    • options: ApplicationConfiguration

      The provided configuration options for the Application

    Returns ApplicationConfiguration

    The final configuration values for the application

  • Internal

    The event handler for changes to form input elements

    Parameters

    • formConfig: ApplicationFormConfiguration

      The configuration of the form being changed

    • event: Event

      The triggering event

    Returns void

  • Internal

    Parameters

    • partId: string

      Part ID

    • context: ApplicationRenderContext

      Context

    Returns Promise<ApplicationRenderContext>

    • Context data
  • Internal

    Update the game settings with the new configuration

    Parameters

    • ...this: any
    • event: SubmitEvent

      The originating form submission event

    • form: HTMLFormElement

      The form element that was submitted

    • formData: FormDataExtended

      Processed data for the submitted form

      • object

        The form data in object form

    Returns Promise<void>