V1.2 #342

Merged
LeRatierBretonnien merged 13 commits from v1.2 into master 2021-01-22 17:19:40 +01:00
3 changed files with 10 additions and 7 deletions
Showing only changes of commit 7bea2e3b29 - Show all commits

View File

@ -1217,9 +1217,11 @@ export class RdDActor extends Actor {
coutreve: Array(20).fill().map((item, index) => 1 + index) coutreve: Array(20).fill().map((item, index) => 1 + index)
} }
if ( this.currentTMR) this.currentTMR.minimize(); // Hide if ( this.currentTMR ) this.currentTMR.minimize(); // Hide
const dialog = await RdDRoll.create(this, rollData, const dialog = await RdDRoll.create(this, rollData,
{html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html'}, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html',
close: html => { this.currentTMR.maximize() } // Re-display TMR
},
{ {
name: 'lancer-un-sort', name: 'lancer-un-sort',
label: 'Lancer un sort', label: 'Lancer un sort',
@ -1235,7 +1237,7 @@ export class RdDActor extends Actor {
this.createCallbackExperience(), this.createCallbackExperience(),
{ action: r => this._rollUnSortResult(r, true) } { action: r => this._rollUnSortResult(r, true) }
] ]
} },
); );
dialog.render(true); dialog.render(true);
} }

View File

@ -24,7 +24,7 @@ export class RdDRoll extends Dialog {
if (dialogConfig.options) { if (dialogConfig.options) {
mergeObject(options, dialogConfig.options, { overwrite: true }) mergeObject(options, dialogConfig.options, { overwrite: true })
} }
return new RdDRoll(actor, rollData, html, options, actions); return new RdDRoll(actor, rollData, html, options, actions, dialogConfig.close );
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -67,12 +67,13 @@ export class RdDRoll extends Dialog {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
constructor(actor, rollData, html, options, actions) { constructor(actor, rollData, html, options, actions, close = undefined) {
let conf = { let conf = {
title: actions[0].label, title: actions[0].label,
content: html, content: html,
buttons: {}, buttons: {},
default: actions[0].name default: actions[0].name,
close: close
}; };
for (let action of actions) { for (let action of actions) {
conf.buttons[action.name] = { label: action.label, callback: html => this.onAction(action, html) }; conf.buttons[action.name] = { label: action.label, callback: html => this.onAction(action, html) };

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon", "name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT", "description": "Rêve de Dragon RPG for FoundryVTT",
"version": "1.1.21", "version": "1.1.22",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.8", "compatibleCoreVersion": "0.7.8",
"templateVersion": 72, "templateVersion": 72,