mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[PR] [Party Sheets] Sidebar character sheet changes (#1249)
* Something experimenting * I am silly (wearning Dunce hat) * Stressful task * Armor functional to be hit * CSS Changes to accomadate pip boy * last minute change to resource section for better visual feeling * restoring old css for toggle * Added setting to toggle pip/number display * toggle functionality added * Fixed light-mode in characterSheet * Fixed multi-row resource pips display for character * Fixed separators * Added pip-display to Adversary and Companion. Some fixing on armor display --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
a50fb9f9ac
commit
ad90f74d20
20 changed files with 774 additions and 383 deletions
|
|
@ -2248,7 +2248,8 @@
|
|||
"target": {
|
||||
"label": "Target"
|
||||
}
|
||||
}
|
||||
},
|
||||
"useResourcePips": { "label": "Pip Display For Resources" }
|
||||
},
|
||||
"fearDisplay": {
|
||||
"token": "Tokens",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
position: { width: 660, height: 766 },
|
||||
window: { resizable: true },
|
||||
actions: {
|
||||
toggleHitPoints: AdversarySheet.#toggleHitPoints,
|
||||
toggleStress: AdversarySheet.#toggleStress,
|
||||
reactionRoll: AdversarySheet.#reactionRoll,
|
||||
toggleResourceDice: AdversarySheet.#toggleResourceDice,
|
||||
handleResourceDice: AdversarySheet.#handleResourceDice
|
||||
|
|
@ -75,6 +77,16 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
const context = await super._prepareContext(options);
|
||||
context.systemFields.attack.fields = this.document.system.attack.schema.fields;
|
||||
|
||||
context.resources = Object.keys(this.document.system.resources).reduce((acc, key) => {
|
||||
acc[key] = this.document.system.resources[key];
|
||||
return acc;
|
||||
}, {});
|
||||
const maxResource = Math.max(context.resources.hitPoints.max, context.resources.stress.max);
|
||||
context.resources.hitPoints.emptyPips =
|
||||
context.resources.hitPoints.max < maxResource ? maxResource - context.resources.hitPoints.max : 0;
|
||||
context.resources.stress.emptyPips =
|
||||
context.resources.stress.max < maxResource ? maxResource - context.resources.stress.max : 0;
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
@ -155,6 +167,27 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
/* Application Clicks Actions */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Toggles hitpoint resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
*/
|
||||
static async #toggleHitPoints(_, button) {
|
||||
const hitPointsValue = Number.parseInt(button.dataset.value);
|
||||
const newValue =
|
||||
this.document.system.resources.hitPoints.value >= hitPointsValue ? hitPointsValue - 1 : hitPointsValue;
|
||||
await this.document.update({ 'system.resources.hitPoints.value': newValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles stress resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
*/
|
||||
static async #toggleStress(_, button) {
|
||||
const StressValue = Number.parseInt(button.dataset.value);
|
||||
const newValue = this.document.system.resources.stress.value >= StressValue ? StressValue - 1 : StressValue;
|
||||
await this.document.update({ 'system.resources.stress.value': newValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a reaction roll for an Adversary.
|
||||
* @type {ApplicationClickAction}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
actions: {
|
||||
toggleVault: CharacterSheet.#toggleVault,
|
||||
rollAttribute: CharacterSheet.#rollAttribute,
|
||||
toggleHitPoints: CharacterSheet.#toggleHitPoints,
|
||||
toggleStress: CharacterSheet.#toggleStress,
|
||||
toggleArmor: CharacterSheet.#toggleArmor,
|
||||
toggleHope: CharacterSheet.#toggleHope,
|
||||
toggleLoadoutView: CharacterSheet.#toggleLoadoutView,
|
||||
openPack: CharacterSheet.#openPack,
|
||||
|
|
@ -196,6 +199,16 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
return acc;
|
||||
}, {});
|
||||
|
||||
context.resources = Object.keys(this.document.system.resources).reduce((acc, key) => {
|
||||
acc[key] = this.document.system.resources[key];
|
||||
return acc;
|
||||
}, {});
|
||||
const maxResource = Math.max(context.resources.hitPoints.max, context.resources.stress.max);
|
||||
context.resources.hitPoints.emptyPips =
|
||||
context.resources.hitPoints.max < maxResource ? maxResource - context.resources.hitPoints.max : 0;
|
||||
context.resources.stress.emptyPips =
|
||||
context.resources.stress.max < maxResource ? maxResource - context.resources.stress.max : 0;
|
||||
|
||||
context.inventory = {
|
||||
currency: {
|
||||
title: game.i18n.localize('DAGGERHEART.CONFIG.Gold.title'),
|
||||
|
|
@ -746,6 +759,37 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
this.render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles hitpoint resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
*/
|
||||
static async #toggleHitPoints(_, button) {
|
||||
const hitPointsValue = Number.parseInt(button.dataset.value);
|
||||
const newValue =
|
||||
this.document.system.resources.hitPoints.value >= hitPointsValue ? hitPointsValue - 1 : hitPointsValue;
|
||||
await this.document.update({ 'system.resources.hitPoints.value': newValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles stress resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
*/
|
||||
static async #toggleStress(_, button) {
|
||||
const StressValue = Number.parseInt(button.dataset.value);
|
||||
const newValue = this.document.system.resources.stress.value >= StressValue ? StressValue - 1 : StressValue;
|
||||
await this.document.update({ 'system.resources.stress.value': newValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles ArmorScore resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
*/
|
||||
static async #toggleArmor(_, button, element) {
|
||||
const ArmorValue = Number.parseInt(button.dataset.value);
|
||||
const newValue = this.document.system.armor.system.marks.value >= ArmorValue ? ArmorValue - 1 : ArmorValue;
|
||||
await this.document.system.armor.update({ 'system.marks.value': newValue });
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles a hope resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ export default class DhCompanionSheet extends DHBaseActorSheet {
|
|||
classes: ['actor', 'companion'],
|
||||
position: { width: 340 },
|
||||
actions: {
|
||||
toggleStress: DhCompanionSheet.#toggleStress,
|
||||
actionRoll: DhCompanionSheet.#actionRoll,
|
||||
levelManagement: DhCompanionSheet.#levelManagement
|
||||
}
|
||||
|
|
@ -50,6 +51,16 @@ export default class DhCompanionSheet extends DHBaseActorSheet {
|
|||
/* Application Clicks Actions */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Toggles stress resource value.
|
||||
* @type {ApplicationClickAction}
|
||||
*/
|
||||
static async #toggleStress(_, button) {
|
||||
const StressValue = Number.parseInt(button.dataset.value);
|
||||
const newValue = this.document.system.resources.stress.value >= StressValue ? StressValue - 1 : StressValue;
|
||||
await this.document.update({ 'system.resources.stress.value': newValue });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
|||
/* Application Clicks Actions */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
||||
/**
|
||||
* Toggle the used state of a resource dice.
|
||||
* @type {ApplicationClickAction}
|
||||
|
|
@ -177,5 +176,4 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
|||
}, {})
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
|||
async _prepareContext(_options) {
|
||||
const context = await super._prepareContext(_options);
|
||||
context.isNPC = this.document.isNPC;
|
||||
context.useResourcePips = game.settings.get(
|
||||
CONFIG.DH.id,
|
||||
CONFIG.DH.SETTINGS.gameSettings.appearance
|
||||
).useResourcePips;
|
||||
context.showAttribution = !game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance)
|
||||
.hideAttribution;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default class DhAppearance extends foundry.abstract.DataModel {
|
|||
});
|
||||
|
||||
return {
|
||||
useResourcePips: new BooleanField({ initial: false }),
|
||||
displayFear: new StringField({
|
||||
required: true,
|
||||
choices: CONFIG.DH.GENERAL.fearDisplay,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export const preloadHandlebarsTemplates = async function () {
|
||||
foundry.applications.handlebars.loadTemplates({
|
||||
'daggerheart.inventory-item-compact': 'systems/daggerheart/templates/sheets/global/partials/inventory-item-compact.hbs',
|
||||
'daggerheart.inventory-item-compact':
|
||||
'systems/daggerheart/templates/sheets/global/partials/inventory-item-compact.hbs',
|
||||
'daggerheart.inventory-items':
|
||||
'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs',
|
||||
'daggerheart.inventory-item': 'systems/daggerheart/templates/sheets/global/partials/inventory-item-V2.hbs'
|
||||
|
|
@ -11,6 +12,7 @@ export const preloadHandlebarsTemplates = async function () {
|
|||
'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs',
|
||||
'systems/daggerheart/templates/sheets/global/partials/item-resource.hbs',
|
||||
'systems/daggerheart/templates/sheets/global/partials/resource-section.hbs',
|
||||
'systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs',
|
||||
'systems/daggerheart/templates/components/card-preview.hbs',
|
||||
'systems/daggerheart/templates/levelup/parts/selectable-card-preview.hbs',
|
||||
'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs',
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@
|
|||
@import './filter-menu.less';
|
||||
@import './tab-attachments.less';
|
||||
@import './dice.less';
|
||||
@import './resource-bar.less';
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
flex: 0 0 40px;
|
||||
height: 40px;
|
||||
position: relative;
|
||||
&:has(.roll-img) {
|
||||
&:has(.roll-img) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
@ -249,9 +249,9 @@
|
|||
|
||||
&.inventory-item-compact {
|
||||
display: grid;
|
||||
grid-template:
|
||||
"img name controls" auto
|
||||
"img labels labels" 1fr
|
||||
grid-template:
|
||||
'img name controls' auto
|
||||
'img labels labels' 1fr
|
||||
/ 40px 1fr min-content;
|
||||
column-gap: 8px;
|
||||
|
||||
|
|
|
|||
178
styles/less/global/resource-bar.less
Normal file
178
styles/less/global/resource-bar.less
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
// Theme sidebar backgrounds
|
||||
.appTheme({
|
||||
.slot-value .slot-bar {
|
||||
background: @dark-blue;
|
||||
}
|
||||
}, {
|
||||
.slot-value .slot-bar {
|
||||
background-image: url('../assets/parchments/dh-parchment-light.png');
|
||||
}
|
||||
});
|
||||
|
||||
.status-bar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
|
||||
.status-label {
|
||||
position: relative;
|
||||
top: 40px;
|
||||
height: 22px;
|
||||
width: 79px;
|
||||
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
|
||||
h4 {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 18px;
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
}
|
||||
}
|
||||
.slot-value {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 5px;
|
||||
font-size: 1.5rem;
|
||||
align-items: center;
|
||||
width: 140px;
|
||||
height: 40px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
color: @beige;
|
||||
|
||||
.slot-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
padding: 5px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 6px;
|
||||
z-index: 1;
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
width: fit-content;
|
||||
|
||||
.slot {
|
||||
width: 15px;
|
||||
height: 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
background: light-dark(@dark-blue-10, @golden-10);
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
|
||||
&.large {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
&.filled {
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
}
|
||||
}
|
||||
|
||||
.empty-slot {
|
||||
width: 15px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
.slot-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
padding: 0 5px;
|
||||
width: fit-content;
|
||||
font-weight: bold;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
font-size: var(--font-size-12);
|
||||
|
||||
.label {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.value {
|
||||
padding-left: 6px;
|
||||
border-left: 1px solid light-dark(@beige, @dark-golden);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status-value {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
padding: 0 5px;
|
||||
font-size: 1.5rem;
|
||||
align-items: center;
|
||||
width: 140px;
|
||||
height: 40px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
color: @beige;
|
||||
|
||||
input[type='number'] {
|
||||
background: transparent;
|
||||
font-size: 1.5rem;
|
||||
width: 40px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
outline: 2px solid transparent;
|
||||
color: @beige;
|
||||
|
||||
&.bar-input {
|
||||
padding: 0;
|
||||
color: @beige;
|
||||
backdrop-filter: none;
|
||||
background: transparent;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: @semi-transparent-dark-blue;
|
||||
backdrop-filter: blur(9.5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bar-label {
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
.progress-bar {
|
||||
position: absolute;
|
||||
appearance: none;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 6px;
|
||||
z-index: 1;
|
||||
background: @dark-blue;
|
||||
|
||||
&::-webkit-progress-bar {
|
||||
border: none;
|
||||
background: @dark-blue;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&::-webkit-progress-value {
|
||||
background: @gradient-hp;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&.stress-color::-webkit-progress-value {
|
||||
background: @gradient-stress;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&::-moz-progress-bar {
|
||||
background: @gradient-hp;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&.stress-color::-moz-progress-bar {
|
||||
background: @gradient-stress;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -109,6 +109,14 @@
|
|||
gap: 16px;
|
||||
margin-bottom: -10px;
|
||||
|
||||
&.pip-display {
|
||||
top: -15px;
|
||||
|
||||
.resources-section {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
|
||||
.resources-section {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,16 @@
|
|||
.appTheme({
|
||||
.character-sidebar-sheet {
|
||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||
|
||||
.experience-value {
|
||||
background: url(../assets/svg/experience-shield.svg) no-repeat;
|
||||
}
|
||||
|
||||
.info-section .status-section .status-bar.armor-slots {
|
||||
.slot-value .slot-bar {
|
||||
background: @dark-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
&.sheet.actor.dh-style.character .character-sidebar-sheet {
|
||||
|
|
@ -21,6 +28,12 @@
|
|||
.portrait.death-roll .death-roll-btn {
|
||||
filter: brightness(0) drop-shadow(0 0 3px @dark-blue);
|
||||
}
|
||||
|
||||
.info-section .status-section .status-bar.armor-slots {
|
||||
.slot-value .slot-bar {
|
||||
background-image: url('../assets/parchments/dh-parchment-light.png');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -127,6 +140,15 @@
|
|||
gap: 10px;
|
||||
margin-bottom: -16px;
|
||||
|
||||
&.pip-display {
|
||||
gap: 15px;
|
||||
|
||||
.resources-section {
|
||||
justify-content: space-around;
|
||||
margin: 8px 2px 8px 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.resources-section {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
|
|
@ -136,7 +158,7 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 100px;
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
|
||||
.status-label {
|
||||
|
|
@ -154,13 +176,14 @@
|
|||
color: light-dark(@beige, @dark-blue);
|
||||
}
|
||||
}
|
||||
|
||||
.status-value {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
padding: 0 6px;
|
||||
padding: 0 5px;
|
||||
font-size: 1.5rem;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
width: 140px;
|
||||
height: 40px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
|
@ -237,6 +260,28 @@
|
|||
gap: 5px;
|
||||
justify-content: center;
|
||||
|
||||
&.pip-display {
|
||||
align-items: end;
|
||||
|
||||
.status-bar.armor-slots {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
|
||||
.slot-value {
|
||||
position: relative;
|
||||
height: auto;
|
||||
|
||||
.slot-bar {
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.status-value {
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status-bar.armor-slots {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
@ -252,6 +297,7 @@
|
|||
width: 95px;
|
||||
border-radius: 3px;
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
clip-path: none;
|
||||
|
||||
h4 {
|
||||
font-weight: bold;
|
||||
|
|
@ -261,6 +307,66 @@
|
|||
font-size: var(--font-size-12);
|
||||
}
|
||||
}
|
||||
.slot-value {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
padding: 0 5px;
|
||||
font-size: 1.2rem;
|
||||
align-items: center;
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
color: light-dark(@dark-blue, @beige);
|
||||
flex-direction: column;
|
||||
|
||||
.slot-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 5px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 6px;
|
||||
z-index: 1;
|
||||
background: @dark-blue;
|
||||
justify-content: center;
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
|
||||
.armor-slot {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: var(--font-size-12);
|
||||
|
||||
.fa-shield-halved {
|
||||
color: light-dark(@dark-blue-40, @golden-40);
|
||||
}
|
||||
}
|
||||
}
|
||||
.slot-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
padding: 0 5px;
|
||||
width: 120%;
|
||||
font-weight: bold;
|
||||
border-radius: 5px;
|
||||
font-size: var(--font-size-12);
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.label {
|
||||
padding-right: 1px;
|
||||
border-bottom: 1px solid @dark-golden;
|
||||
}
|
||||
|
||||
.value {
|
||||
padding-left: 6px;
|
||||
border-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.status-value {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
|
|
@ -292,8 +398,6 @@
|
|||
color: light-dark(@dark-blue, @beige);
|
||||
backdrop-filter: none;
|
||||
background: transparent;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: @semi-transparent-dark-blue;
|
||||
|
|
@ -306,7 +410,6 @@
|
|||
width: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
position: absolute;
|
||||
appearance: none;
|
||||
|
|
@ -318,7 +421,6 @@
|
|||
background: light-dark(transparent, @dark-blue);
|
||||
border-bottom: none;
|
||||
border-radius: 6px 6px 0 0;
|
||||
|
||||
&::-webkit-progress-bar {
|
||||
border: none;
|
||||
background: light-dark(transparent, @dark-blue);
|
||||
|
|
|
|||
|
|
@ -37,11 +37,22 @@
|
|||
}
|
||||
}
|
||||
|
||||
.resource-section {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.status-section {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
justify-content: center;
|
||||
|
||||
&.pip-display {
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.status-number {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -84,103 +95,103 @@
|
|||
}
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
// .status-bar {
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// position: relative;
|
||||
// width: 100px;
|
||||
// height: 40px;
|
||||
|
||||
.status-label {
|
||||
position: relative;
|
||||
top: 40px;
|
||||
height: 22px;
|
||||
width: 79px;
|
||||
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
// .status-label {
|
||||
// position: relative;
|
||||
// top: 40px;
|
||||
// height: 22px;
|
||||
// width: 79px;
|
||||
// clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
|
||||
// background: light-dark(@dark-blue, @golden);
|
||||
|
||||
h4 {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 18px;
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
}
|
||||
}
|
||||
.status-value {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
padding: 0 6px;
|
||||
font-size: 1.5rem;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
z-index: 2;
|
||||
color: @beige;
|
||||
// h4 {
|
||||
// font-weight: bold;
|
||||
// text-align: center;
|
||||
// line-height: 18px;
|
||||
// color: light-dark(@beige, @dark-blue);
|
||||
// }
|
||||
// }
|
||||
// .status-value {
|
||||
// position: absolute;
|
||||
// display: flex;
|
||||
// padding: 0 6px;
|
||||
// font-size: 1.5rem;
|
||||
// align-items: center;
|
||||
// width: 100px;
|
||||
// height: 40px;
|
||||
// justify-content: center;
|
||||
// text-align: center;
|
||||
// z-index: 2;
|
||||
// color: @beige;
|
||||
|
||||
input[type='number'] {
|
||||
background: transparent;
|
||||
font-size: 1.5rem;
|
||||
width: 40px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
outline: 2px solid transparent;
|
||||
color: @beige;
|
||||
// input[type='number'] {
|
||||
// background: transparent;
|
||||
// font-size: 1.5rem;
|
||||
// width: 40px;
|
||||
// height: 30px;
|
||||
// text-align: center;
|
||||
// border: none;
|
||||
// outline: 2px solid transparent;
|
||||
// color: @beige;
|
||||
|
||||
&.bar-input {
|
||||
padding: 0;
|
||||
color: @beige;
|
||||
backdrop-filter: none;
|
||||
background: transparent;
|
||||
transition: all 0.3s ease;
|
||||
// &.bar-input {
|
||||
// padding: 0;
|
||||
// color: @beige;
|
||||
// backdrop-filter: none;
|
||||
// background: transparent;
|
||||
// transition: all 0.3s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: @semi-transparent-dark-blue;
|
||||
backdrop-filter: blur(9.5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
// &:hover,
|
||||
// &:focus {
|
||||
// background: @semi-transparent-dark-blue;
|
||||
// backdrop-filter: blur(9.5px);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
.bar-label {
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
.progress-bar {
|
||||
position: absolute;
|
||||
appearance: none;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 6px;
|
||||
z-index: 1;
|
||||
background: @dark-blue;
|
||||
// .bar-label {
|
||||
// width: 40px;
|
||||
// }
|
||||
// }
|
||||
// .progress-bar {
|
||||
// position: absolute;
|
||||
// appearance: none;
|
||||
// width: 100px;
|
||||
// height: 40px;
|
||||
// border: 1px solid light-dark(@dark-blue, @golden);
|
||||
// border-radius: 6px;
|
||||
// z-index: 1;
|
||||
// background: @dark-blue;
|
||||
|
||||
&::-webkit-progress-bar {
|
||||
border: none;
|
||||
background: @dark-blue;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&::-webkit-progress-value {
|
||||
background: @gradient-hp;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&.stress-color::-webkit-progress-value {
|
||||
background: @gradient-stress;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&::-moz-progress-bar {
|
||||
background: @gradient-hp;
|
||||
border-radius: 6px;
|
||||
}
|
||||
&.stress-color::-moz-progress-bar {
|
||||
background: @gradient-stress;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// &::-webkit-progress-bar {
|
||||
// border: none;
|
||||
// background: @dark-blue;
|
||||
// border-radius: 6px;
|
||||
// }
|
||||
// &::-webkit-progress-value {
|
||||
// background: @gradient-hp;
|
||||
// border-radius: 6px;
|
||||
// }
|
||||
// &.stress-color::-webkit-progress-value {
|
||||
// background: @gradient-stress;
|
||||
// border-radius: 6px;
|
||||
// }
|
||||
// &::-moz-progress-bar {
|
||||
// background: @gradient-hp;
|
||||
// border-radius: 6px;
|
||||
// }
|
||||
// &.stress-color::-moz-progress-bar {
|
||||
// background: @gradient-stress;
|
||||
// border-radius: 6px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
.level-div {
|
||||
white-space: nowrap;
|
||||
|
|
|
|||
|
|
@ -1,196 +1,196 @@
|
|||
@import '../../../utils/colors.less';
|
||||
@import '../../../utils/fonts.less';
|
||||
@import '../../../utils/mixin.less';
|
||||
|
||||
body.game:is(.performance-low, .noblur) {
|
||||
.application.sheet.daggerheart.actor.dh-style.party .tab.resources .actors-list .actor-resources {
|
||||
background: light-dark(@dark-blue, @dark-golden);
|
||||
|
||||
.actor-name {
|
||||
background: light-dark(@dark-blue, @dark-golden);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.application.sheet.daggerheart.actor.dh-style.party {
|
||||
.tab.resources {
|
||||
max-height: 400px;
|
||||
overflow: auto;
|
||||
|
||||
.actors-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
|
||||
.actor-resources {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
background: light-dark(@dark-blue-40, @dark-golden-40);
|
||||
border-radius: 6px;
|
||||
max-width: 230px;
|
||||
height: -webkit-fill-available;
|
||||
|
||||
.actor-name {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
background: light-dark(@dark-blue-90, @dark-golden-80);
|
||||
backdrop-filter: blur(6.5px);
|
||||
border-radius: 6px 6px 0px 0px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
font-size: var(--font-size-20);
|
||||
color: light-dark(@beige, @golden);
|
||||
font-weight: bold;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.actor-img {
|
||||
height: 150px;
|
||||
object-fit: cover;
|
||||
object-position: top center;
|
||||
border-radius: 6px 6px 0px 0px;
|
||||
mask-image: linear-gradient(180deg, black 88%, transparent 100%);
|
||||
}
|
||||
|
||||
.resources {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
margin: 10px;
|
||||
|
||||
.slot-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.slot-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
width: 239px;
|
||||
|
||||
background-color: light-dark(@dark-blue-10, @dark-blue);
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
padding: 5px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 6px;
|
||||
width: fit-content;
|
||||
|
||||
.armor-slot {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: var(--font-size-12);
|
||||
|
||||
.fa-shield-halved {
|
||||
color: light-dark(@dark-blue-40, @golden-40);
|
||||
}
|
||||
}
|
||||
|
||||
.slot {
|
||||
width: 20px;
|
||||
height: 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
background: light-dark(@dark-blue-10, @golden-10);
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
|
||||
&.filled {
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
}
|
||||
}
|
||||
}
|
||||
.slot-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
padding: 0 5px;
|
||||
width: fit-content;
|
||||
font-weight: bold;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
font-size: var(--font-size-12);
|
||||
|
||||
.label {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.value {
|
||||
padding-left: 6px;
|
||||
border-left: 1px solid @dark-golden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hope-section {
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
background-color: light-dark(transparent, @dark-blue);
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 3px;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
|
||||
h4 {
|
||||
font-size: var(--font-size-12);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
}
|
||||
|
||||
.hope-value {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-12);
|
||||
}
|
||||
}
|
||||
|
||||
.threshold-section {
|
||||
display: flex;
|
||||
align-self: center;
|
||||
gap: 10px;
|
||||
background-color: light-dark(transparent, @dark-blue);
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 3px;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
|
||||
h4 {
|
||||
font-size: var(--font-size-12);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
|
||||
&.threshold-value {
|
||||
color: light-dark(@dark, @beige);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.actors-dragger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border: 1px dashed light-dark(@dark-blue-50, @beige-50);
|
||||
border-radius: 3px;
|
||||
color: light-dark(@dark-blue-50, @beige-50);
|
||||
}
|
||||
}
|
||||
}
|
||||
@import '../../../utils/colors.less';
|
||||
@import '../../../utils/fonts.less';
|
||||
@import '../../../utils/mixin.less';
|
||||
|
||||
body.game:is(.performance-low, .noblur) {
|
||||
.application.sheet.daggerheart.actor.dh-style.party .tab.resources .actors-list .actor-resources {
|
||||
background: light-dark(@dark-blue, @dark-golden);
|
||||
|
||||
.actor-name {
|
||||
background: light-dark(@dark-blue, @dark-golden);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.application.sheet.daggerheart.actor.dh-style.party {
|
||||
.tab.resources {
|
||||
max-height: 400px;
|
||||
overflow: auto;
|
||||
|
||||
.actors-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
|
||||
.actor-resources {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
background: light-dark(@dark-blue-40, @dark-golden-40);
|
||||
border-radius: 6px;
|
||||
max-width: 230px;
|
||||
height: -webkit-fill-available;
|
||||
|
||||
.actor-name {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
background: light-dark(@dark-blue-90, @dark-golden-80);
|
||||
backdrop-filter: blur(6.5px);
|
||||
border-radius: 6px 6px 0px 0px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
font-size: var(--font-size-20);
|
||||
color: light-dark(@beige, @golden);
|
||||
font-weight: bold;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.actor-img {
|
||||
height: 150px;
|
||||
object-fit: cover;
|
||||
object-position: top center;
|
||||
border-radius: 6px 6px 0px 0px;
|
||||
mask-image: linear-gradient(180deg, black 88%, transparent 100%);
|
||||
}
|
||||
|
||||
.resources {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
margin: 10px;
|
||||
|
||||
.slot-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.slot-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
width: 239px;
|
||||
|
||||
background-color: light-dark(@dark-blue-10, @dark-blue);
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
padding: 5px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 6px;
|
||||
width: fit-content;
|
||||
|
||||
.armor-slot {
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: var(--font-size-12);
|
||||
|
||||
.fa-shield-halved {
|
||||
color: light-dark(@dark-blue-40, @golden-40);
|
||||
}
|
||||
}
|
||||
|
||||
.slot {
|
||||
width: 20px;
|
||||
height: 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
background: light-dark(@dark-blue-10, @golden-10);
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
|
||||
&.filled {
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
}
|
||||
}
|
||||
}
|
||||
.slot-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
padding: 0 5px;
|
||||
width: fit-content;
|
||||
font-weight: bold;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
font-size: var(--font-size-12);
|
||||
|
||||
.label {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.value {
|
||||
padding-left: 6px;
|
||||
border-left: 1px solid light-dark(@beige, @dark-golden);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hope-section {
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
background-color: light-dark(transparent, @dark-blue);
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 3px;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
|
||||
h4 {
|
||||
font-size: var(--font-size-12);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
}
|
||||
|
||||
.hope-value {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-12);
|
||||
}
|
||||
}
|
||||
|
||||
.threshold-section {
|
||||
display: flex;
|
||||
align-self: center;
|
||||
gap: 10px;
|
||||
background-color: light-dark(transparent, @dark-blue);
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid light-dark(@dark-blue, @golden);
|
||||
border-radius: 3px;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
|
||||
h4 {
|
||||
font-size: var(--font-size-12);
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
color: light-dark(@dark-blue, @golden);
|
||||
|
||||
&.threshold-value {
|
||||
color: light-dark(@dark, @beige);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.actors-dragger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border: 1px dashed light-dark(@dark-blue-50, @beige-50);
|
||||
border-radius: 3px;
|
||||
color: light-dark(@dark-blue-50, @beige-50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
<section class="tab {{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
{{formGroup
|
||||
fields.useResourcePips
|
||||
value=setting.useResourcePips
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.displayFear
|
||||
value=setting.displayFear
|
||||
|
|
|
|||
|
|
@ -4,35 +4,10 @@
|
|||
<a class="death-roll-btn"><i class="fa-solid fa-skull death-save"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="info-section">
|
||||
<div class="info-section {{#if useResourcePips}}pip-display{{/if}}">
|
||||
<div class="resources-section">
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<input class="bar-input" name="system.resources.hitPoints.value" min="0" max='{{source.system.resources.hitPoints.max}}'
|
||||
value="{{source.system.resources.hitPoints.value}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{source.system.resources.hitPoints.max}}</span>
|
||||
</div>
|
||||
<progress class='progress-bar' value='{{source.system.resources.hitPoints.value}}'
|
||||
max='{{source.system.resources.hitPoints.max}}'></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize 'DAGGERHEART.GENERAL.HitPoints.short'}}</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<input class="bar-input" name="system.resources.stress.value" min="0" max='{{source.system.resources.stress.max}}'
|
||||
value="{{source.system.resources.stress.value}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{source.system.resources.stress.max}}</span>
|
||||
</div>
|
||||
<progress class='progress-bar stress-color' value='{{source.system.resources.stress.value}}'
|
||||
max='{{source.system.resources.stress.max}}'></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize 'DAGGERHEART.GENERAL.stress'}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.hitPoints label="DAGGERHEART.GENERAL.HitPoints.short" key="system.resources.hitPoints.value" action="toggleHitPoints" }}
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }}
|
||||
</div>
|
||||
<div class="status-section">
|
||||
<div class="status-number">
|
||||
|
|
|
|||
|
|
@ -15,44 +15,12 @@
|
|||
<a class="death-roll-btn" data-tooltip="DAGGERHEART.UI.Tooltip.makeDeathMove" {{#if
|
||||
isDeath}}data-action="makeDeathMove" {{/if}}><i class="fa-solid fa-skull death-save"></i></a>
|
||||
</div>
|
||||
<div class="info-section">
|
||||
<div class="info-section {{#if useResourcePips}}pip-display{{/if}}">
|
||||
<div class="resources-section">
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<input class="bar-input" name="system.resources.hitPoints.value" min="0" max='{{document.system.resources.hitPoints.max}}'
|
||||
value="{{document.system.resources.hitPoints.value}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{document.system.resources.hitPoints.max}}</span>
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar'
|
||||
max='{{document.system.resources.hitPoints.max}}'
|
||||
value='{{document.system.resources.hitPoints.value}}'
|
||||
></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.HitPoints.short"}}</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<input class="bar-input" name="system.resources.stress.value" min="0" max='{{document.system.resources.stress.max}}'
|
||||
value="{{document.system.resources.stress.value}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{document.system.resources.stress.max}}</span>
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar stress-color'
|
||||
value='{{document.system.resources.stress.value}}'
|
||||
min="0"
|
||||
max='{{document.system.resources.stress.max}}'
|
||||
></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.stress"}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.hitPoints label="DAGGERHEART.GENERAL.HitPoints.short" key="system.resources.hitPoints.value" action="toggleHitPoints" }}
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }}
|
||||
</div>
|
||||
<div class="status-section">
|
||||
<div class="status-section {{#if useResourcePips}}pip-display{{/if}}">
|
||||
<div class="status-number">
|
||||
<div class='status-value'>
|
||||
<p>{{document.system.evasion}}</p>
|
||||
|
|
@ -64,10 +32,29 @@
|
|||
|
||||
{{#if document.system.armor.system.marks}}
|
||||
<div class="status-bar armor-slots">
|
||||
{{#if useResourcePips}}
|
||||
<div class='slot-value'>
|
||||
<div class="slot-bar">
|
||||
{{#times document.system.armorScore}}
|
||||
<a class='armor-slot' data-action='toggleArmor' data-value="{{add this 1}}">
|
||||
{{#if (gte ../document.system.armor.system.marks.value (add this 1))}}
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
{{else}}
|
||||
<i class="fa-solid fa-shield-halved"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/times}}
|
||||
</div>
|
||||
<div class="slot-label">
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.armorSlots"}}</span>
|
||||
<span class="value">{{document.system.armor.system.marks.value}} / {{document.system.armorScore}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='status-value'>
|
||||
<p><input class="bar-input armor-marks-input" value="{{document.system.armor.system.marks.value}}" type="number"></p>
|
||||
<p>/</p>
|
||||
<p class="bar-label">{{document.system.armorScore}}</p>
|
||||
<input class="bar-input armor-marks-input" value="{{document.system.armor.system.marks.value}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{document.system.armorScore}}</span>
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar stress-color'
|
||||
|
|
@ -77,6 +64,7 @@
|
|||
<div class="status-label">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="status-number armor-slots">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@
|
|||
placeholder='{{localize "DAGGERHEART.GENERAL.actorName"}}'
|
||||
/>
|
||||
</h1>
|
||||
<div class="status-section">
|
||||
{{#if useResourcePips}}
|
||||
<div class="resource-section">
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=document.system.resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" largePips=true }}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="status-section {{#if useResourcePips}}pip-display{{/if}}">
|
||||
<div class="status-number">
|
||||
<div class='status-value'>
|
||||
<p>{{document.system.evasion}}</p>
|
||||
|
|
@ -17,21 +22,11 @@
|
|||
<h4>{{localize "DAGGERHEART.GENERAL.evasion"}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<input class="bar-input" name="system.resources.stress.value" value="{{document.system.resources.stress.value}}" min="0" max='{{document.system.resources.stress.max}}' type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{document.system.resources.stress.max}}</span>
|
||||
{{#unless useResourcePips}}
|
||||
<div class="resource-section">
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=document.system.resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }}
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar stress-color'
|
||||
value='{{document.system.resources.stress.value}}'
|
||||
max='{{document.system.resources.stress.max}}'
|
||||
></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.stress"}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
<div class='level-div'>
|
||||
<h3 class='label'>
|
||||
{{localize 'DAGGERHEART.GENERAL.level'}}
|
||||
|
|
|
|||
35
templates/sheets/global/partials/resource-bar.hbs
Normal file
35
templates/sheets/global/partials/resource-bar.hbs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<div class="status-bar">
|
||||
{{#if useResourcePips}}
|
||||
<div class='slot-value'>
|
||||
<div class="slot-bar">
|
||||
{{#times resource.max}}
|
||||
<span class='slot {{#if (gte ../resource.value (add this 1))}}filled{{/if}} {{#if ../largePips}}large{{/if}}' data-action="{{../action}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
|
||||
{{#times resource.emptyPips}}
|
||||
<span class="empty-slot"></span>
|
||||
{{/times}}
|
||||
</div>
|
||||
<div class="slot-label">
|
||||
<span class="label">{{localize label}}</span>
|
||||
<span class="value">{{resource.value}} / {{resource.max}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='status-value'>
|
||||
<input class="bar-input" name="{{key}}" min="0" max='{{resource.max}}'
|
||||
value="{{resource.value}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{resource.max}}</span>
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar'
|
||||
max='{{resource.max}}'
|
||||
value='{{resource.value}}'
|
||||
></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize label}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue