2020-12-10 20:14:35 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Extend the base Dialog entity by defining a custom window to perform roll.
|
|
|
|
* @extends {Dialog}
|
|
|
|
*/
|
2021-04-25 10:08:40 +02:00
|
|
|
export class RdDAstrologieEditeur extends Dialog {
|
2020-12-10 20:14:35 +01:00
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
constructor(html, calendrier, calendrierData) {
|
|
|
|
|
|
|
|
let myButtons = {
|
2021-04-25 10:08:40 +02:00
|
|
|
resetButton: { label: "Re-tirer les nombres astraux", callback: html => this.resetNombreAstraux() },
|
2020-12-11 08:29:24 +01:00
|
|
|
saveButton: { label: "Fermer", callback: html => this.fillData() }
|
2020-12-10 20:14:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// Common conf
|
|
|
|
let dialogConf = { content: html, title: "Editeur d'Astrologie", buttons: myButtons, default: "saveButton" };
|
2022-12-06 01:30:12 +01:00
|
|
|
let dialogOptions = { classes: ["rdd-roll-dialog"], width: 600, height: 300, 'z-index': 99999 }
|
2020-12-10 20:14:35 +01:00
|
|
|
super(dialogConf, dialogOptions)
|
|
|
|
|
|
|
|
this.calendrier = calendrier;
|
|
|
|
this.updateData( calendrierData );
|
|
|
|
}
|
|
|
|
|
2022-12-09 02:00:31 +01:00
|
|
|
activateListeners(html) {
|
|
|
|
super.activateListeners(html);
|
|
|
|
this.html = html;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-04-25 10:08:40 +02:00
|
|
|
/* -------------------------------------------- */
|
2021-06-01 21:58:40 +02:00
|
|
|
async resetNombreAstraux() {
|
2021-04-25 10:08:40 +02:00
|
|
|
game.system.rdd.calendrier.resetNombreAstral();
|
2021-06-25 14:17:58 +02:00
|
|
|
await game.system.rdd.calendrier.rebuildListeNombreAstral();
|
2021-04-25 10:08:40 +02:00
|
|
|
|
|
|
|
game.system.rdd.calendrier.showAstrologieEditor();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
2020-12-10 20:14:35 +01:00
|
|
|
fillData( ) {
|
|
|
|
}
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
updateData( calendrierData ) {
|
|
|
|
this.calendrierData = duplicate(calendrierData);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|