A generic application to render a settings modal.

Hierarchy (view full)

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;
    };
} = ...

Type declaration

  • actions: {
        resetForm: ((event: Event) => Promise<void>);
    }
    • resetForm: ((event: Event) => Promise<void>)
        • (event): Promise<void>
        • Internal

          The event handler that is fired when the form is reset to its original values

          Parameters

          • event: Event

            The triggering event

          Returns Promise<void>

  • classes: string[]
  • form: {
        closeOnSubmit: boolean;
        handler: ((...this: any, event: SubmitEvent, form: HTMLFormElement, formData: FormDataExtended) => Promise<void>);
        submitOnChange: boolean;
        submitOnClose: boolean;
    }
    • closeOnSubmit: boolean
    • handler: ((...this: any, event: SubmitEvent, form: HTMLFormElement, formData: FormDataExtended) => Promise<void>)
        • (...this, event, form, formData): Promise<void>
        • Internal

          Update the game settings with the new configuration

          Parameters

          • Rest...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

          Returns Promise<void>

    • submitOnChange: boolean
    • submitOnClose: boolean
  • position: {
        width: number;
    }
    • width: number
  • sheetConfig: boolean
  • tag: string
  • window: {
        minimizable: boolean;
        resizable: boolean;
    }
    • 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

    Update the game settings with the new configuration

    Parameters

    • Rest...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

    Returns Promise<void>