Amélioration de tooltips

- style en phase avec le système
- icones attaque/d6/soins pour le HUD
- tooltip plus détaillé pour le HUD
- icône et bouton pour déterminer les chiffres astraux (astrologie)
- tooltips pour les boutons archétype
- suppression de log sur chaque point de coeur
This commit is contained in:
Vincent Vandemeulebrouck 2023-12-08 18:56:59 +01:00
parent e4bd2d2f27
commit 7267cd4096
11 changed files with 63 additions and 41 deletions

View File

@ -1804,7 +1804,10 @@ export class RdDActor extends RdDBaseActorSang {
}
blessuresASoigner() {
return this.filterItems(it => it.system.gravite > 0 && it.system.gravite <= 6 && !(it.system.premierssoins.done && it.system.soinscomplets.done), 'blessure')
return (this.itemTypes[TYPES.blessure])
.filter(it => it.system.gravite > 0 && it.system.gravite <= 6)
.filter(it => !(it.system.premierssoins.done && it.system.soinscomplets.done))
.sort(Misc.descending(b => (b.system.premierssoins.done ? "A" : "B") + b.system.gravite))
}
async getTacheBlessure(blesse, blessure) {

View File

@ -90,7 +90,6 @@ export class RdDTokenHud {
if (target?.actor) {
const hudSoins = { blessures: target.actor.blessuresASoigner() ?? [] };
if (hudSoins.blessures.length > 0) {
// soins
const controlIconTarget = html.find('.control-icon[data-action=combat]');
await RdDTokenHud._configureSubMenu(controlIconTarget,
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-soins.hbs',

View File

@ -1363,43 +1363,37 @@ table.table-nombres-astraux tr:hover {
justify-content: flex-start;
flex-direction: column;
position: absolute;
top: 2.75rem;
right: 4rem;
top: 4.6rem;
right: 3.5rem;
}
.token-hud-ext.soins {
justify-content: flex-start;
flex-direction: column;
position: absolute;
top: 13.2rem;
left: -5rem;
max-width: 8.5rem
top: 14.7rem;
left: -6rem;
max-width: 8rem;
line-height: 1rem;
}
.token-hud-ext.right {
justify-content: flex-start;
flex-direction: column;
position: absolute;
top: 2.75rem;
left: 4rem;
top: 4.6rem;
left: 3.5rem;
}
.control-icon.token-hud-icon {
width: fit-content;
div.control-icon.token-hud-icon {
width: 9rem;
height: fit-content;
border-radius: 0.3rem;
min-width: 6rem;
flex-basis: auto;
padding: 0;
line-height: 1rem;
line-height: 0.95rem;
margin: 0.2rem;
}
.control-icon.token-hud-icon.right {
margin-left: 8px;
}
.rdd-hud-menu label {
font-size: 0.8rem;
}
#token-hud .status-effects.active{
z-index: 2;
}
/* ======================================== */
.item-checkbox {
height: 25px;
@ -1941,6 +1935,14 @@ div.calendar-timestamp-edit select.calendar-signe-heure {
padding: 3px;
}
aside#tooltip{
background: var(--background-tooltip);
color: var(--color-text-dark-primary);
font-size: 1rem;
border-radius: 0.2rem;
padding: 0.4rem;
}
.tooltip :is(.ttt-xp,.ttt-levelup) {
width: 250px;
background: var(--background-tooltip) !important;

View File

@ -70,9 +70,13 @@
{{#if options.vueDetaillee}}
&nbsp;&nbsp;
{{#if @root.options.vueArchetype}}
<a class="competence-archetype toggle-archetype chat-card-button-pushed"><i class="fa-solid fa-up-right-from-square"></i>Incarnation</a>
<a class="competence-archetype toggle-archetype chat-card-button-pushed" data-tooltip="Retour à la vue détaillée des compétences">
<i class="fa-solid fa-up-right-from-square"></i>Incarnation
</a>
{{else}}
<a class="competence-archetype toggle-archetype chat-card-button"><i class="fa-solid fa-people-line"></i>Archétype</a>
<a class="competence-archetype toggle-archetype chat-card-button" data-tooltip="Gestion de l'archétype et de la réincarnation">
<i class="fa-solid fa-people-line"></i>Archétype
</a>
{{/if}}
{{/if}}
</span>

View File

@ -2,7 +2,8 @@
<ul class="item-list">
{{#if @root.options.isGM}}
<li>
<a class="nouvelle-incarnation chat-card-button"><i class="fa-solid fa-person-circle-plus"></i> Nouvelle incarnation</a>
<a class="nouvelle-incarnation chat-card-button" data-tooltip="Création d'une nouvelle incarnation de l'archétype">
<i class="fa-solid fa-person-circle-plus"></i> Nouvelle incarnation</a>
</li>
{{/if}}
<li><hr></li>

View File

@ -1,2 +1,7 @@
<h3>Astrologie</h3>
<span class="astrologie-label"><a name="jet-astrologie">Astrologie : Nombres Astraux</a></span>
<span class="astrologie-label chat-card-button">
<a name="jet-astrologie">
<i class="fa-solid fa-moon-over-sun"></i>
Astrologie: Nombres Astraux
</a>
</span>

View File

@ -1,4 +1,3 @@
{{log 'C&oelig;ur' numero courant prochain}}
<a data-numero-coeur="{{numero}}">
{{#if (and (lte numero courant) (lte numero prochain))}}
<i class="fa-solid fa-heart"></i>

View File

@ -6,8 +6,8 @@
<div class="control-icon token-hud-icon rdd-hud-menu rdd-attaque"
data-combatant-id="{{../combatant.id}}"
data-action-index="{{action.index}}"
data-tooltip="{{action.name}}">
<label>{{action.name}} {{action.system.infoMain}}</label>
data-tooltip="Attaque: {{action.name}}">
<label><i class="fa-solid fa-sword"></i> {{action.name}} {{action.system.infoMain}}</label>
</div>
{{/unless}}
{{/each}}

View File

@ -5,8 +5,8 @@
<div class="control-icon token-hud-icon rdd-hud-menu"
data-combatant-id="{{../combatant.id}}"
data-action-index="{{action.index}}"
data-tooltip="{{action.name}}">
<label>init: {{action.name}} {{action.system.infoMain}}</label>
data-tooltip="Initiative {{action.name}}">
<label><i class="fa-solid fa-dice-d6"></i><span> {{action.name}} {{action.system.infoMain}}</span></label>
</div>
{{/each}}
{{#each commandes as |commande key|}}

View File

@ -4,8 +4,14 @@
{{#each blessures as |blessure|}}
<div class="control-icon token-hud-icon rdd-hud-menu"
data-blessure-id="{{blessure.id}}"
data-tooltip="{{blessure.name}}">
<label>Soigner: {{blessure.name}}</label>
data-tooltip="Jet de {{#if system.premierssoins.done}}Soins complets{{else}}Premiers soins{{/if}} sur blessure {{blessure.name}}">
<label>
{{#if system.premierssoins.done}}
<i class="fa-solid fa-user-nurse"></i> Soins complets blessure {{blessure.name}}
{{else}}
<i class="fa-solid fa-bandage"></i> Premiers soins blessure {{blessure.name}}
{{/if}}
</label>
</div>
{{/each}}
</div>

View File

@ -57,7 +57,7 @@
{{#if isRepos}}
<div class="form-group">
<label for="system.reposalchimique">Repos Alchimique ?</label>
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
</div>
{{/if}}
{{/if}}
@ -66,19 +66,22 @@
<label for="system.pr">Points de rêve</label>
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
</div>
{{#if isSoins}}
<div class="form-group">
<label>Points de guérison</label>
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
</div>
{{/if}}
{{#if isRepos}}
<div class="form-group">
<label>Points de repos</label>
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
</div>
{{/if}}
<div class="form-group">
<label for="system.prpermanent">Permanente ? </label>
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
</div>
{{#if (or isSoins isRepos)}}
<div class="form-group">
<label>Points de
{{#if isSoins}}guérison{{/if}}
{{#if isRepos}}repos{{/if}}
</label>
<label>{{system.puissance}}</label>
</div>
{{/if}}
<div class="form-group">
<label for="enchantement.jour">Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
</div>