feat: add style to armors tooltip, add a style to make armor slot label more clear that was a button and add a tooltip location

This commit is contained in:
Murilo Brito 2026-03-09 02:25:38 -03:00
parent 420d436bb1
commit 3bfa6b28ed
5 changed files with 59 additions and 17 deletions

View file

@ -3078,7 +3078,8 @@
"immune": "Immune",
"middleClick": "[Middle Click] Keep tooltip view",
"tokenSize": "The token size used on the canvas",
"previewTokenHelp": "Left-click to place, right-click to cancel"
"previewTokenHelp": "Left-click to place, right-click to cancel",
"clickManageArmor": "Click to manage armor equipments"
}
}
}

View file

@ -319,6 +319,8 @@
display: flex;
align-items: center;
gap: 4px;
border: 1px solid transparent;
transition: all 0.3s ease;
h4 {
font-weight: bold;
@ -332,6 +334,15 @@
font-size: 12px;
color: light-dark(@beige, @dark-blue);
}
&:hover {
background: light-dark(@light-black, @dark-blue);
border: 1px solid light-dark(@dark-blue, @golden);
h4, i {
color: light-dark(@dark-blue, @golden);
}
}
}
.slot-value {
position: absolute;
@ -369,7 +380,7 @@
}
}
}
.slot-label {
.slot-label {
display: flex;
align-items: center;
color: light-dark(@beige, @dark-blue);
@ -381,6 +392,17 @@
font-size: var(--font-size-12);
flex-wrap: wrap;
justify-content: center;
border: 1px solid transparent;
transition: all 0.3s ease;
&:hover {
background: light-dark(@light-black, @dark-blue);
border: 1px solid light-dark(@dark-blue, @golden);
.label, .value, i {
color: light-dark(@dark-blue, @golden);
}
}
.label {
padding-right: 1px;

View file

@ -1,7 +1,19 @@
@import '../../utils/fonts.less';
@import '../../utils/colors.less';
.bordered-tooltip.locked-tooltip .daggerheart.armor-management-container {
display: flex;
flex-direction: column;
gap: 16px;
gap: 10px;
padding-bottom: 10px;
h3 {
font-family: @font-subtitle;
margin: 0;
border: none;
font-weight: normal;
font-size: var(--font-size-20);
}
.armor-source-container {
display: flex;
@ -10,16 +22,16 @@
gap: 4px;
.armor-source-label {
font-size: var(--font-size-24);
font-weight: bold;
font-family: @font-body;
margin: 0;
}
.status-bar {
display: flex;
justify-content: center;
position: relative;
width: 80px;
height: 20px;
width: 100%;
height: 30px;
.status-value {
position: absolute;
@ -27,8 +39,8 @@
padding: 0 5px;
font-size: 1rem;
align-items: center;
width: 80px;
height: 20px;
width: 100%;
height: 30px;
justify-content: center;
text-align: center;
z-index: 2;
@ -36,13 +48,13 @@
input[type='number'] {
background: transparent;
font-size: 1rem;
font-size: 1.2rem;
width: 30px;
height: 15px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
font-family: @font-body;
&.bar-input {
padding: 0;
@ -50,6 +62,7 @@
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
height: 25px;
&:hover,
&:focus {
@ -60,14 +73,16 @@
}
.bar-label {
font-family: @font-body;
width: 40px;
font-size: 1.2rem;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 80px;
height: 20px;
width: 100%;
height: 30px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
z-index: 1;
@ -107,8 +122,11 @@
border-radius: 6px;
z-index: 1;
background: @dark-blue;
align-items: center;
justify-content: center;
color: light-dark(@dark-blue, @golden);
min-height: 30px;
width: 100%;
.armor-slot {
cursor: pointer;

View file

@ -45,7 +45,7 @@
</a>
{{/times}}
</div>
<a class="slot-label" data-action="toggleArmorMangement">
<a class="slot-label" data-action="toggleArmorMangement" data-tooltip="{{localize 'DAGGERHEART.UI.Tooltip.clickManageArmor'}}">
<span class="label">{{localize "DAGGERHEART.GENERAL.armorSlots"}}</span>
<div class="slot-value-container">
<span class="value">{{document.system.armorScore.value}} / {{document.system.armorScore.max}}</span>
@ -64,7 +64,7 @@
value='{{document.system.armorScore.value}}'
max='{{document.system.armorScore.max}}'
></progress>
<a class="status-label" data-action="toggleArmorMangement">
<a class="status-label" data-action="toggleArmorMangement" data-tooltip="{{localize 'DAGGERHEART.UI.Tooltip.clickManageArmor'}}">
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
<i class="fa-solid fa-gear"></i>
</a>

View file

@ -1,8 +1,9 @@
<div class="daggerheart armor-management-container">
<h3>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h3>
{{#each sources as |source|}}
{{#if ../useResourcePips}}
<div class="armor-source-container">
<label class="armor-source-label">{{source.name}}</label>
<p class="armor-source-label">{{source.name}}</p>
<div class="slot-bar">
{{#times source.max}}
<a class='armor-slot' data-value="{{add this 1}}" data-uuid="{{source.uuid}}">
@ -17,7 +18,7 @@
</div>
{{else}}
<div class="armor-source-container">
<label class="armor-source-label">{{source.name}}</label>
<p class="armor-source-label">{{source.name}}</p>
<div class="status-bar armor-slots">
<div class='status-value'>
<input class="bar-input armor-marks-input" value="{{source.value}}" data-uuid="{{source.uuid}}" type="number">