Merge branch 'Caracs-alignment' into 'v1.4'

Align in Caracteristics for Characters

See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!251
This commit is contained in:
Leratier Bretonnien 2021-05-24 19:13:47 +00:00
commit 22bdf60e93
2 changed files with 63 additions and 35 deletions

View File

@ -326,7 +326,33 @@ table {border: 1px solid #7a7971;}
.rdd.sheet .window-content .sheet-body {overflow-y: scroll;} .rdd.sheet .window-content .sheet-body {overflow-y: scroll;}
.rdd.sheet .window-content .sheet-body .tab {padding-bottom: 30px;} .rdd.sheet .window-content .sheet-body .tab {padding-bottom: 30px;}
.rdd.sheet .window-content .sheet-body .competence-list {width: 100%;} .rdd.sheet .window-content .sheet-body .competence-list {width: 100%;}
.rdd.sheet .window-content .sheet-body .carac-list {width: 100%;} .rdd.sheet .window-content .sheet-body .carac-list {
width: 100%;
flex-grow: 0;
}
.rdd.sheet .window-content .sheet-body .carac-list .competence {
flex-wrap: nowrap;
justify-content: stretch;
}
.rdd.sheet .window-content .sheet-body .carac-list .competence > .carac-label {
flex-basis: 50%;
}
.rdd.sheet .window-content .sheet-body .carac-list .competence > .attribut-label {
flex-basis: 50%;
}
.rdd.sheet .window-content .sheet-body .carac-list .competence > .competence-value.total {
flex-grow: 1;
text-align: right;
}
.rdd.sheet .window-content .sheet-body .carac-list .competence > .utiliser-attribut {
flex-basis: available;
flex-grow: 1;
}
.rdd.sheet .window-content .sheet-body .carac-list .competence > * {
flex-basis: 13%;
flex-grow: 0;
}
.editor { .editor {
border: 2; border: 2;

View File

@ -111,11 +111,13 @@
{{!-- Carac Tab --}} {{!-- Carac Tab --}}
<div class="tab items" data-group="primary" data-tab="carac"> <div class="tab items" data-group="primary" data-tab="carac">
<div class="grid grid-2col"> <div class="flexrow">
<div class="flex-group-left flexcol">
<span><a class="lock-unlock-sheet"><img class="small-button-container" <span><a class="lock-unlock-sheet"><img class="small-button-container"
src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer" src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
>{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span> >{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
</div>
<div class="grid grid-2col">
<div class="flex-group-left flexcol">
<ul class="carac-list alterne-list"> <ul class="carac-list alterne-list">
{{#each data.carac as |carac key|}} {{#each data.carac as |carac key|}}
{{#if carac.isLevelUp}} {{#if carac.isLevelUp}}
@ -124,83 +126,83 @@
<li class="competence flexrow list-item" data-attribute="{{key}}"> <li class="competence flexrow list-item" data-attribute="{{key}}">
{{/if}} {{/if}}
{{#if (eq key 'taille')}} {{#if (eq key 'taille')}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span> <span class="carac-label" name="data.carac.{{key}}.label">{{carac.label}}</span>
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> <input class="carac-value" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
<label class="carac-xp flexrow"/> <label class="carac-xp"/>
{{else}} {{else}}
{{#if carac.derivee}} {{#if carac.derivee}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label"> <a name={{key}}>{{carac.label}}</a></span> <span class="carac-label" name="data.carac.{{key}}.label"> <a name={{key}}>{{carac.label}}</a></span>
<label class="competence-value flexrow">{{carac.value}}</label> <label class="competence-value">{{carac.value}}</label>
<label class="carac-xp flexrow"/> <label class="carac-xp"/>
{{else}} {{else}}
{{#if carac.isLevelUp}} {{#if carac.isLevelUp}}
<span class="carac-label flexrow tooltip" name="data.carac.{{key}}.label"> <span class="carac-label tooltip" name="data.carac.{{key}}.label">
<span class="tooltiptext ttt-xp"> <span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{carac.xpNext}} points d'Experience pour augmenter de 1 votre caractéristique {{carac.label}} Vous pouvez dépenser {{carac.xpNext}} points d'Experience pour augmenter de 1 votre caractéristique {{carac.label}}
</span> </span>
<a name={{key}}>{{carac.label}}</a></span> <a name={{key}}>{{carac.label}}</a></span>
{{else}} {{else}}
<span class="carac-label flexrow tooltip" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> <span class="carac-label tooltip" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
{{/if}} {{/if}}
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> <input class="carac-value" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
<input class="carac-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> <input class="carac-xp" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
{{/if}} {{/if}}
{{/if}} {{/if}}
</li> </li>
{{/each}} {{/each}}
<li class="competence flexrow"> <li class="competence flexrow">
<span class="carac-label flexrow" name="carac-total">Total Caractéristiques </span> <span class="carac-label" name="carac-total">Total Caractéristiques </span>
<span class="competence-value flexrow" name="carac-total-value">{{calc.caracTotal}} </span> <span class="competence-value total" name="carac-total-value">{{calc.caracTotal}} </span>
</li> </li>
</ul> </ul>
</div> </div>
<div class="flex-group-left flexcol" > <div class="flex-group-left flexcol" >
<ul class="carac-list"> <ul class="carac-list">
<li class="competence flexrow list-item"> <li class="competence flexrow list-item">
<span class="competence-label flexrow" name="beaute">Beauté : <span class="carac-label" name="beaute">Beauté&nbsp;:</span>
<input class="description-value" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/> <input class="description-value" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
</span> <label class="carac-xp"/>
</li> </li>
{{#each data.attributs as |attr key|}} {{#each data.attributs as |attr key|}}
{{#unless (eq key 'hautrevant')}} {{#unless (eq key 'hautrevant')}}
<li class="competence flexrow list-item" data-attribute="{{key}}"> <li class="competence flexrow list-item" data-attribute="{{key}}">
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : <span class="carac-label" name="data.attributs.{{key}}.label">{{attr.label}}&nbsp;:</span>
{{#if (eq key 'protection')}} {{#if (eq key 'protection')}}
<input id="attribut-protection-edit" type="text" name="{{key}}" value="{{attr.value}}" data-dtype="number"/><span/> <input class="description-value" id="attribut-protection-edit" type="text" name="{{key}}" value="{{attr.value}}" data-dtype="number"/>
{{else}} {{else}}
{{attr.value}} <input class="description-value" type="text" disabled name="data.attributs.{{key}}." value="{{attr.value}}" data-dtype="number"/>
{{/if}} {{/if}}
</span> <label class="carac-xp"/>
</li> </li>
{{/unless}} {{/unless}}
{{/each}} {{/each}}
</ul> </ul>
<ul class="carac-list alterne-list"> <ul class="carac-list alterne-list">
<li class="competence flexrow list-item"> <li class="competence flexrow list-item">
<span class="generic-label chance-actuelle"><a>Chance actuelle</a></span> <span class="attribut-label chance-actuelle"><a>Chance actuelle</a></span>
<input class="compteur-edit" type="text" name="chance" value="{{data.compteurs.chance.value}}" data-dtype="number"/> <input class="description-value compteur-edit" type="text" name="chance" value="{{data.compteurs.chance.value}}" data-dtype="number"/>
<span style="padding-left: 5px"><a class="item-control chance-appel">Utiliser</a></span> <span class="utiliser-attribut" style="padding-left: 5px"><a class="item-control chance-appel">Utiliser</a></span>
</li> </li>
{{#each data.compteurs as |compteur key|}} {{#each data.compteurs as |compteur key|}}
{{#if (eq compteur.label 'Chance')}} {{#if (eq compteur.label 'Chance')}}
{{else if (eq compteur.label 'Experience')}} {{else if (eq compteur.label 'Experience')}}
{{else if compteur.isInput}} {{else if compteur.isInput}}
<li class="competence flexrow list-item"> <li class="competence flexrow list-item">
<span class="generic-label">{{compteur.label}}</span> <span class="attribut-label">{{compteur.label}}</span>
{{#if (eq compteur.label 'Ethylisme')}} {{#if (eq compteur.label 'Ethylisme')}}
<select name="data.compteurs.ethylisme.value" id="ethylisme" data-dtype="Number"> <select class="description-value" name="data.compteurs.ethylisme.value" id="ethylisme" data-dtype="Number">
{{#select compteur.value}} {{#select compteur.value}}
{{>"systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html"}}
{{/select}} {{/select}}
</select> </select>
{{else}} {{else}}
<input class="compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/> <input class="description-value compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
{{/if}} {{/if}}
<span style="padding-left: 5px"> <span class="utiliser-attribut" style="padding-left: 5px">
{{#if compteur.isStress}} {{#if compteur.isStress}}
<a class="item-control stress-test" title="Transformer">Transformer</a> <a class="item-control stress-test" title="Transformer">Transformer</a>
{{else if (eq compteur.label 'Ethylisme')}} {{else if (eq compteur.label 'Ethylisme')}}
<a class="item-control ethylisme-test" id="ethylisme-test" title="Jet d'Ethylisme">Jet d'Ethylisme</a> <a class="item-control ethylisme-test" id="ethylisme-test" title="Jet d'Ethylisme">Boire</a>
{{else if (eq compteur.label 'Moral')}} {{else if (eq compteur.label 'Moral')}}
<a class="moral-malheureux" title="Jet de moral situation malheureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg" alt="Jet de moral situation malheureuse"/></a> <a class="moral-malheureux" title="Jet de moral situation malheureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg" alt="Jet de moral situation malheureuse"/></a>
<a class="moral-neutre" title="Jet de moral situation neutre"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg" alt="Jet de moral situation neutre"/></a> <a class="moral-neutre" title="Jet de moral situation neutre"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg" alt="Jet de moral situation neutre"/></a>
@ -213,7 +215,7 @@
{{/if}} {{/if}}
{{/each}} {{/each}}
</ul> </ul>
<ul class="carac-list"></ul> <!-- <ul class="carac-list"></ul>-->
</div> </div>
</div> </div>
</div> </div>