add attack config and disable experience value input

This commit is contained in:
molilo 2025-07-03 10:36:52 -03:00
parent 85dac730b7
commit f7c42fdddf
6 changed files with 41 additions and 5 deletions

View file

@ -5157,6 +5157,12 @@ div.daggerheart.views.multiclass {
align-items: center; align-items: center;
width: 100%; width: 100%;
} }
.application.sheet.daggerheart.actor.dh-style.companion .partner-section,
.application.sheet.daggerheart.actor.dh-style.companion .attack-section {
display: flex;
flex-direction: column;
align-items: center;
}
.application.sheet.daggerheart.actor.dh-style.companion .partner-section .title, .application.sheet.daggerheart.actor.dh-style.companion .partner-section .title,
.application.sheet.daggerheart.actor.dh-style.companion .attack-section .title { .application.sheet.daggerheart.actor.dh-style.companion .attack-section .title {
display: flex; display: flex;
@ -5175,9 +5181,11 @@ div.daggerheart.views.multiclass {
align-items: center; align-items: center;
} }
.application.sheet.daggerheart.actor.dh-style.companion .partner-placeholder { .application.sheet.daggerheart.actor.dh-style.companion .partner-placeholder {
display: flex;
opacity: 0.6; opacity: 0.6;
text-align: center; text-align: center;
font-style: italic; font-style: italic;
justify-content: center;
} }
.application.sheet.daggerheart.actor.dh-style.companion .experience-list { .application.sheet.daggerheart.actor.dh-style.companion .experience-list {
display: flex; display: flex;
@ -5513,6 +5521,19 @@ div.daggerheart.views.multiclass {
box-shadow: none; box-shadow: none;
outline: 2px solid light-dark(#222, #efe6d8); outline: 2px solid light-dark(#222, #efe6d8);
} }
.application.dh-style input[type='text']:disabled[type='text'],
.application.dh-style input[type='number']:disabled[type='text'],
.application.dh-style input[type='text']:disabled[type='number'],
.application.dh-style input[type='number']:disabled[type='number'] {
outline: 2px solid transparent;
cursor: not-allowed;
}
.application.dh-style input[type='text']:disabled[type='text']:hover,
.application.dh-style input[type='number']:disabled[type='text']:hover,
.application.dh-style input[type='text']:disabled[type='number']:hover,
.application.dh-style input[type='number']:disabled[type='number']:hover {
background: transparent;
}
.application.dh-style input[type='checkbox']:checked::after { .application.dh-style input[type='checkbox']:checked::after {
color: light-dark(#222, #f3c267); color: light-dark(#222, #f3c267);
} }

View file

@ -4,6 +4,10 @@
.application.sheet.daggerheart.actor.dh-style.companion { .application.sheet.daggerheart.actor.dh-style.companion {
.partner-section, .partner-section,
.attack-section { .attack-section {
display: flex;
flex-direction: column;
align-items: center;
.title { .title {
display: flex; display: flex;
gap: 15px; gap: 15px;
@ -22,9 +26,11 @@
} }
.partner-placeholder { .partner-placeholder {
display: flex;
opacity: 0.6; opacity: 0.6;
text-align: center; text-align: center;
font-style: italic; font-style: italic;
justify-content: center;
} }
.experience-list { .experience-list {

View file

@ -23,6 +23,16 @@
box-shadow: none; box-shadow: none;
outline: 2px solid light-dark(@dark, @beige); outline: 2px solid light-dark(@dark, @beige);
} }
&:disabled[type='text'],
&:disabled[type='number'] {
outline: 2px solid transparent;
cursor: not-allowed;
&:hover {
background: transparent;
}
}
} }
input[type='checkbox'] { input[type='checkbox'] {

View file

@ -14,7 +14,7 @@
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=document.system.partner type='actor' isSidebar=true isActor=true noTooltip=true}} {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=document.system.partner type='actor' isSidebar=true isActor=true noTooltip=true}}
</ul> </ul>
{{else}} {{else}}
<div class="partner-placeholder">{{localize "DAGGERHEART.Sheets.Companion.noPartner"}}</div> <span class="partner-placeholder">{{localize "DAGGERHEART.Sheets.Companion.noPartner"}}</span>
{{/if}} {{/if}}
</div> </div>
<div class="attack-section"> <div class="attack-section">

View file

@ -8,9 +8,8 @@
{{formGroup systemFields.attack.fields.img value=document.system.attack.img label="Image Path" name="system.attack.img"}} {{formGroup systemFields.attack.fields.img value=document.system.attack.img label="Image Path" name="system.attack.img"}}
{{formGroup systemFields.attack.fields.name value=document.system.attack.name label="Attack Name" name="system.attack.name"}} {{formGroup systemFields.attack.fields.name value=document.system.attack.name label="Attack Name" name="system.attack.name"}}
</fieldset> </fieldset>
{{!-- <fieldset class="flex"> <fieldset class="flex">
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend> <legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend>
{{formField systemFields.attack.fields.roll.fields.bonus value=document.system.attack.roll.bonus label="Attack Bonus" name="system.attack.roll.bonus"}}
{{formField systemFields.attack.fields.range value=document.system.attack.range label="Range" name="system.attack.range" localize=true}} {{formField systemFields.attack.fields.range value=document.system.attack.range label="Range" name="system.attack.range" localize=true}}
{{#if systemFields.attack.fields.target.fields}} {{#if systemFields.attack.fields.target.fields}}
{{ formField systemFields.attack.fields.target.fields.type value=document.system.attack.target.type label="Target" name="system.attack.target.type" localize=true }} {{ formField systemFields.attack.fields.target.fields.type value=document.system.attack.target.type label="Target" name="system.attack.target.type" localize=true }}
@ -18,5 +17,5 @@
{{ formField systemFields.attack.fields.target.fields.amount value=document.system.attack.target.amount label="Amount" name="system.attack.target.amount" }} {{ formField systemFields.attack.fields.target.fields.amount value=document.system.attack.target.amount label="Amount" name="system.attack.target.amount" }}
{{/if}} {{/if}}
{{/if}} {{/if}}
</fieldset> --}} </fieldset>
</section> </section>

View file

@ -9,7 +9,7 @@
{{#each document.system.experiences as |experience key|}} {{#each document.system.experiences as |experience key|}}
<li class="experience-item"> <li class="experience-item">
<input class="name" type="text" name="system.experiences.{{key}}.name" value="{{experience.name}}" /> <input class="name" type="text" name="system.experiences.{{key}}.name" value="{{experience.name}}" />
<input class="modifier" type="text" name="system.experiences.{{key}}.value" value="{{experience.value}}" data-dtype="Number" /> <input disabled class="modifier" type="text" name="system.experiences.{{key}}.value" value="{{experience.value}}" data-dtype="Number" />
</li> </li>
{{/each}} {{/each}}
</ul> </ul>