foundryvtt-reve-de-dragon/module/rdd-tmr-dialog.js

46 lines
1.0 KiB
JavaScript

/**
* Extend the base Dialog entity by defining a custom window to perform spell.
* @extends {Dialog}
*/
export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
constructor(sort, html, actor) {
// Common conf
let dialogConf = {
content: html,
buttons:
{
rollButton:
{
label: "Lancer",
callback: html => this.performRoll(html)
}
},
default: "rollButton"
}
let dialogOptions = { classes: [ "tmrdialog"] }
dialogConf.title = "Terres Médianes de Rêve",
dialogOptions.width = 600;
dialogOptions.height = 360;
super(dialogConf, dialogOptions);
this.sort = sort;
this.actor = actor;
}
/* -------------------------------------------- */
performRoll (html) {
this.actor.performRoll( this.rollData );
}
/* -------------------------------------------- */
activateListeners(html) {
super.activateListeners(html);
}
}