forked from public/foundryvtt-reve-de-dragon
Fix livre
This commit is contained in:
45
module/rdd-tmr-dialog.js
Normal file
45
module/rdd-tmr-dialog.js
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user