add settings registration
This commit is contained in:
@@ -25,6 +25,8 @@ const MAINTAIN_ICONS = [
|
||||
'icons/magic/symbols/triangle-glowing-green.webp',
|
||||
];
|
||||
|
||||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
|
||||
function _hashCode(str) {
|
||||
let hash = 0;
|
||||
if (str.length === 0) {
|
||||
@@ -38,6 +40,34 @@ function _hashCode(str) {
|
||||
return Math.abs(hash);
|
||||
}
|
||||
|
||||
export class PowerFormApplicationV2 extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
constructor(powerEffect) {
|
||||
super();
|
||||
const name = powerEffect.name.replaceAll(/[^a-zA-Z]/g, '');
|
||||
this.options.id = `${this.options.id}${name}`;
|
||||
this.powerEffect = powerEffect;
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
id: ['mbSwadePowerEffectsApplicationV2'],
|
||||
form: {
|
||||
handler: PowerFormApplicationV2.#onSubmit,
|
||||
closeOnSubmit: true,
|
||||
},
|
||||
tag: 'form',
|
||||
position: {
|
||||
width: 400,
|
||||
height: 'auto',
|
||||
},
|
||||
window: {
|
||||
icon: 'fas fa-gear',
|
||||
title: 'mbSwade.powerEffectsForm.title',
|
||||
},
|
||||
};
|
||||
|
||||
static #onSubmit(event, form, formData) {}
|
||||
}
|
||||
|
||||
export class PowerFormApplication extends FormApplication {
|
||||
constructor(powerEffect) {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user