diff --git a/module/actor.js b/module/actor.js index 042d17ab..00e582fd 100644 --- a/module/actor.js +++ b/module/actor.js @@ -476,12 +476,12 @@ export class RdDActor extends Actor { return; } - console.log("Loading TMR template!!!"); let data = { fatigueHTML:"" + RdDUtility.makeHTMLfatigueMatrix( this.data.data.sante.fatigue.value, this.data.data.sante.endurance.max ).html() + "
", draconic: this.getDraconicList(), sort: this.getSortList(), - caracReve: this.data.data.carac.reve.value + caracReve: this.data.data.carac.reve.value, + pointsReve: this.data.data.reve.reve.value } let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html', data ); new RdDTMRDialog(sortID, html, this ).render(true); diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index 2262beb5..c8acb84a 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -15,13 +15,13 @@ export class RdDTMRDialog extends Dialog { content: html, buttons: { - rollButton: + closeButton: { label: "Fermer", - callback: html => this.performRoll(html) + callback: html => this.close(html) } }, - default: "rollButton" + default: "closeButton" } let dialogOptions = { classes: [ "tmrdialog"] } @@ -281,6 +281,11 @@ export class RdDTMRDialog extends Dialog { } } + /* -------------------------------------------- */ + lancerSort () { + console.log("Lancer de sort !!!!!"); + } + /* -------------------------------------------- */ async activateListeners(html) { super.activateListeners(html); @@ -288,7 +293,12 @@ export class RdDTMRDialog extends Dialog { var row = document.getElementById("tmrrow1"); var cell1 = row.insertCell(1); cell1.append( this.pixiApp.view ); - + + // Roll Sort + html.find('#lancer-sort').click((event) => { + this.lancerSort(); + }); + // load the texture we need await this.pixiApp.loader.add('tmr', 'systems/foundryvtt-reve-de-dragon/styles/ui/tmp_main_r1.webp').load((loader, resources) => { // This creates a texture from a 'bunny.png' image diff --git a/templates/dialog-tmr.html b/templates/dialog-tmr.html index 4cda6def..861e68b1 100644 --- a/templates/dialog-tmr.html +++ b/templates/dialog-tmr.html @@ -4,24 +4,27 @@
-
+
Rêve Actuel : 0
-
+
Coordonnées : 0
-
+
Etat général : 0
-
+
Refoulement : 0
Fatigue {{{fatigueHTML}}}
-
- +
+ +
+
+
@@ -35,8 +38,7 @@
- - +
Sorts :
- + +
+ +
+