Fix livre

This commit is contained in:
LeRatierBretonnien 2020-07-05 22:35:18 +02:00
parent ea94e27e5a
commit 7d9f6fd6c3
7 changed files with 35 additions and 11 deletions

View File

@ -24,10 +24,10 @@ export class RdDTMRDialog extends Dialog {
let dialogOptions = { classes: [ "tmrdialog"] } let dialogOptions = { classes: [ "tmrdialog"] }
dialogConf.title = "Terres Médianes de Rêve", dialogConf.title = "Terres Médianes de Rêve",
dialogOptions.width = 600; dialogOptions.width = 740;
dialogOptions.height = 360; dialogOptions.height = 960;
super(dialogConf, dialogOptions); super(dialogConf, dialogOptions);
this.sort = sort; this.sort = sort;
this.actor = actor; this.actor = actor;
} }
@ -38,8 +38,22 @@ export class RdDTMRDialog extends Dialog {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
loadImage(url) {
return new Promise(r => { let i = new Image(); i.onload = (() => r(i)); i.src = url; });
}
/* -------------------------------------------- */
async init_canvas() {
var ctx = document.getElementById('canvas_tmr');
ctx = ctx.getContext('2d');
let img = await this.loadImage("systems/foundryvtt-reve-de-dragon/styles/ui/tmp_main_r1.webp");
await ctx.drawImage(img, 0, 0, 720, 860);
}
/* -------------------------------------------- */
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
this.init_canvas();
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

BIN
styles/ui/tmp_main_r1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

@ -2,10 +2,10 @@
"name": "foundryvtt-reve-de-dragon", "name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"description": "L'implémentation de Rêve de Dragon pour FoundryVTT", "description": "L'implémentation de Rêve de Dragon pour FoundryVTT",
"version": "0.7.9", "version": "0.7.10",
"minimumCoreVersion": "0.6.0", "minimumCoreVersion": "0.6.0",
"compatibleCoreVersion": "0.6.2", "compatibleCoreVersion": "0.6.2",
"templateVersion": 17, "templateVersion": 18,
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",
"esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ],
"styles": ["styles/simple.css"], "styles": ["styles/simple.css"],

View File

@ -217,12 +217,21 @@
"derivee": true "derivee": true
} }
}, },
"compteurs": { "reve": {
"reve": { "reve": {
"max": 0, "max": 0,
"value": 0, "value": 0,
"label": "Points de Rêve" "label": "Points de Rêve actuels"
}, },
"tmrpos": {
"coord": "",
"label": "Position TMR"
},
"reserve": {
"reserveList": []
}
},
"compteurs": {
"sust": { "sust": {
"value": 0, "value": 0,
"label": "Sust." "label": "Sust."
@ -384,7 +393,7 @@
"difficulte": 0, "difficulte": 0,
"points_de_tache": 0, "points_de_tache": 0,
"encombrement": 0, "encombrement": 0,
"xp": 0, "xp": "",
"cout": 0 "cout": 0
}, },
"potion": { "potion": {

View File

@ -9,7 +9,8 @@
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label>Ajustement final : </label><label id="roll-param">10 / 0</label>
</div> </div>
<img src="systems/foundryvtt-reve-de-dragon/styles/ui/terres_medianes.png" /> <canvas id="canvas_tmr" width="720" height="860">
</canvas>
</form> </form>

View File

@ -26,7 +26,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Expérience</label> <label for="xp">Expérience</label>
<input class="attribute-value" type="text" name="data.xp" value="{{data.xp}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="data.xp" value="{{data.xp}}" data-dtype="String"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Encombrement </label> <label for="xp">Encombrement </label>