import { Imperium5Utility } from "./imperium5-utility.js"; export class Imperium5RollDialog extends Dialog { /* -------------------------------------------- */ static async create(actor, rollData ) { let options = { classes: ["Imperium5Dialog"], width: 620, height: 380, 'z-index': 99999 } let html = await renderTemplate('systems/fvtt-imperium5/templates/roll-dialog-generic.html', rollData) return new Imperium5RollDialog(actor, rollData, html, options ) } /* -------------------------------------------- */ constructor(actor, rollData, html, options, close = undefined) { let conf = { title:"Jet", content: html, buttons: { roll: { icon: '', label: "Roll !", callback: () => { this.roll() } }, cancel: { icon: '', label: "Cancel", callback: () => { this.close() } } }, close: close } super(conf, options); this.actor = actor; this.rollData = rollData; } /* -------------------------------------------- */ roll () { Imperium5Utility.rollImperium5( this.rollData ) } /* -------------------------------------------- */ activateListeners(html) { super.activateListeners(html) var dialog = this function onLoad() { } $(function () { onLoad(); }) } }