Dialog chateau-dormant

Pour permettre de pré-remplir les infos de chateau dormant
This commit is contained in:
2023-02-07 18:06:45 +01:00
parent 07d0d92f57
commit c70b6c9d5f
17 changed files with 467 additions and 167 deletions

View File

@ -1,34 +0,0 @@
<form class="dialog-repos">
<img class="chat-icon" src="{{img}}" title="{{name}}" alt="{{name}}" />
<div class="flexcol">
<div class="flexrow"><span>
<h2>{{name}} se repose</h2>
</span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="chateau-dormant" value="chateau-dormant">
<label for="chateau-dormant">Château Dormant</label>
</span></div>
<div class="flexrow"><span><hr></span></div>
<div class="flexrow"><span>
<input class type="radio" name="repos" id="sieste" value="sieste">
<label for="sieste">Sieste de quelques heures</label>
</span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="nuit" value="nuit" checked>
<label for="nuit">Dormir la nuit</label>
</span></div>
<div class="flexrow">
<label for="nb-heures">Nombre d'heures</label>
<input type="number" name="nb-heures" value="4" data-dtype="Number" />
</div>
<div class="flexrow"><span><hr></span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="gris-reve" value="gris-reve">
<label for="gris-reve">Gris rêve</label>
</span></div>
<div class="flexrow">
<label for="nb-jours">Nombre de jours</label>
<input type="number" name="nb-jours" value="2" data-dtype="Number" />
</div>
</div>
</form>

View File

@ -0,0 +1,48 @@
<form class="chateau-dormant">
<div class="flexcol">
<div class="form-group">
<label for="motifStress">Motif de stress</label>
<input type="text" name="motifStress" value="{{motifStress}}" data-dtype="String" />
</div>
<hr>
<ul class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="flex-grow-3">Personnage</span>
<span class="flex-shrink">Insomnie</span>
<span class="flex-grow-1">Sommeil</span>
<span class="flex-shrink">Stress</span>
<span class="flex-grow-1">Moral</span>
<span class="flex-shrink">Ignorer</span>
</li>
{{#each actorsSettings as |actorSetting|}}
<li class="item flexrow list-item set-sommeil-actor" data-actor-id="{{actorSetting.actor.id}}">
<span class="flex-grow-3">
<label>
<img class="chat-icon" src="{{actorSetting.actor.img}}" title="{{actorSetting.actor.name}}" />
<span>{{actorSetting.actor.name}}</span>
</label>
</span>
<span class="flex-shrink">
<input type="checkbox" class="sommeil-insomnie" {{#if actorSetting.insomnie}}checked{{/if}}>
</span>
<span class="flex-grow-1">
<input type="number" class="number-x sommeil-heures" data-dtype="Number"
value="{{#if actorSetting.insomnie}}0{{else}}4{{/if}}"
min="0" max="{{#if actorSetting.insomnie}}0{{else}}12{{/if}}"
{{#if actorSetting.insomnie}}disabled{{/if}}/>
h
</span>
<span class="flex-shrink">
<input type="number" class="number-x2 sommeil-stress" value="0" data-dtype="Number" min="0" max="200"/>
</span>
<span class="flex-grow-1 flexrow sommeil-actor-moral">
{{> "systems/foundryvtt-reve-de-dragon/templates/sommeil/sommeil-actor-moral.hbs" actorSetting}}
</span>
<span class="flex-shrink">
<input type="checkbox" class="sommeil-ignorer">
</span>
</li>
{{/each}}
</ul>
</div>
</form>

View File

@ -0,0 +1,53 @@
<form class="dialog-repos">
<img class="chat-icon" src="{{img}}" title="{{name}}" alt="{{name}}" />
<div class="flexcol">
<div class="flexrow"><span>
<h2>{{name}} se repose</h2>
</span></div>
{{#if system.sommeil.insomnie}}
<div class="flexrow"><span>
Insomnie, impossible de dormir
</span></div>
{{else}}
<div class="flexrow"><span>
<input class type="radio" name="repos" id="sieste" value="sieste">
<label for="sieste">Sieste de
<input type="number" name="sieste.heures" value="1" data-dtype="Number" />
heures</label>
</span></div>
<div class="flexrow"><span><hr></span></div>
{{#if system.sommeil.nouveaujour}}
<div class="flexrow"><span>
<input type="radio" name="repos" id="chateau-dormant" value="chateau-dormant">
<label for="chateau-dormant">Juste château Dormant</label>
</span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="nuit" value="nuit" checked>
<label for="nuit">Dormir
<input type="number" name="sommeil.heures" value="{{system.sommeil.heures}}" data-dtype="Number" />
heures cette nuit
</label>
</span></div>
<div class="flexrow">
<label for="moral">Moral</label>
<div class="sommeil-actor-moral">
{{> "systems/foundryvtt-reve-de-dragon/templates/sommeil/sommeil-actor-moral.hbs" system.sommeil}}
</div>
</div>
{{else}}
<div class="flexrow"><span>
Le gardien des rêves doit faire passer Chateau Dormant
</span></div>
{{/if}}
{{/if}}
<div class="flexrow"><span><hr></span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="gris-reve" value="gris-reve">
<label for="gris-reve">Gris rêve</label>
</span></div>
<div class="flexrow">
<label for="nb-jours">Nombre de jours</label>
<input type="number" name="nb-jours" value="2" data-dtype="Number" />
</div>
</div>
</form>

View File

@ -0,0 +1,11 @@
<span>
<a data-moral="malheureux">
<i class="{{#if (eq moral 'malheureux')}}fa-solid{{else}}fa-regular{{/if}} fa-face-sad-tear"></i>
</a>
<a data-moral="neutre">
<i class="{{#if (eq moral 'neutre')}}fa-solid{{else}}fa-regular{{/if}} fa-face-meh"></i>
</a>
<a data-moral="heureux">
<i class="{{#if (eq moral 'heureux')}}fa-solid{{else}}fa-regular{{/if}} fa-face-smile"></i>
</a>
</span>