A generic application to render a settings modal.

Abstract

Hierarchy

Constructors

Properties

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

Type declaration

  • actions: {
        resetForm: ((event) => Promise<void>);
    }
    • resetForm: ((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: ((event, form, formData) => Promise<void>);
        submitOnChange: boolean;
        submitOnClose: boolean;
    }
    • closeOnSubmit: boolean
    • handler: ((event, form, formData) => Promise<void>)
        • (event, form, formData): Promise<void>
        • Internal

          Update the game settings with the new configuration

          Parameters

          • 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

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

Generated using TypeDoc