Ajout du rêve dans le header

This commit is contained in:
Vincent Vandemeulebrouck 2020-11-17 19:29:18 +01:00
parent 8ec2a43cf3
commit 9a573d5f51
2 changed files with 14 additions and 6 deletions

View File

@ -320,10 +320,18 @@ export class RdDActorSheet extends ActorSheet {
this.actor.santeIncDec("endurance", 1); this.actor.santeIncDec("endurance", 1);
this.render(true); this.render(true);
}); });
html.find('#ptreve-actuel-plus').click((event) => {
this.actor.updatePointsDeReve(1);
this.render(true);
});
html.find('#endurance-moins').click((event) => { html.find('#endurance-moins').click((event) => {
this.actor.santeIncDec("endurance", -1); this.actor.santeIncDec("endurance", -1);
this.render(true); this.render(true);
}); });
html.find('#ptreve-actuel-moins').click((event) => {
this.actor.updatePointsDeReve(-1);
this.render(true);
});
html.find('#fatigue-plus').click((event) => { html.find('#fatigue-plus').click((event) => {
this.actor.santeIncDec("fatigue", 1); this.actor.santeIncDec("fatigue", 1);
this.render(true); this.render(true);

View File

@ -14,14 +14,18 @@
<input class="resource-content" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/>/{{data.sante.vie.max}} <input class="resource-content" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/>/{{data.sante.vie.max}}
</div> </div>
<div> <div>
<span>Endurance <a id="endurance-plus">+</a> / <a id="endurance-moins">-</a></span> <span>Endurance <a id="endurance-plus">+</a> / <a id="endurance-moins">-</a></span>
<input class="resource-content" type="text" name="data.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/>/{{data.sante.endurance.max}} <input class="resource-content" type="text" name="data.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/>/{{data.sante.endurance.max}}
</div> </div>
<div> <div>
<span>Sonné :</span> <span>Sonné :</span>
<input class="resource-content" type="checkbox" name="data.sante.sonne.value" value="{{data.sante.sonne.value}}" {{#if data.sante.sonne.value}}checked{{/if}} /> <input class="resource-content" type="checkbox" name="data.sante.sonne.value" value="{{data.sante.sonne.value}}" {{#if data.sante.sonne.value}}checked{{/if}} />
</div> </div>
</div> <div>
<span><span class="ptreve-actuel"><a>Rêve</a></span> <a id="ptreve-actuel-plus">+</a> / <a id="ptreve-actuel-moins">-</a></span>
<input class="resource-content" id="pointsreve-value-header" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number" />/{{data.reve.seuil.value}}
</div>
</div>
<div class="flex-group-center flex-fatigue"> <div class="flex-group-center flex-fatigue">
Fatigue <a id="fatigue-plus">+</a> / <a id="fatigue-moins">-</a> Fatigue <a id="fatigue-plus">+</a> / <a id="fatigue-moins">-</a>
<span>{{{data.fatigueHTML}}}</span> <span>{{{data.fatigueHTML}}}</span>
@ -411,10 +415,6 @@
<span class="visu-tmr"><a title="Regarder les Terres Medianes"><img src="icons/svg/eye.svg" alt="Regarder les Terres Medianes" width="50" height="50"/></a></span> <span class="visu-tmr"><a title="Regarder les Terres Medianes"><img src="icons/svg/eye.svg" alt="Regarder les Terres Medianes" width="50" height="50"/></a></span>
</div> </div>
</li> </li>
<li class="item flexrow">
<span class="ptreve-actuel competence-label"><a>Points de Rêve actuels</a> :</span>
<span><input class="pointsreve-value" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number"/></span>
</li>
<li class="item flexrow"> <li class="item flexrow">
<span class="competence-label">Seuil de Rêve :</span> <span class="competence-label">Seuil de Rêve :</span>
<span> <span>