mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 12:41:07 +01:00
Fixed multi-row resource pips display for character
This commit is contained in:
parent
0d807eb3b7
commit
069a941cd3
5 changed files with 56 additions and 67 deletions
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}}' data-action='toggleHitPoints' 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 "DAGGERHEART.GENERAL.HitPoints.short"}}</span>
|
||||
<span class="value">{{resource.value}} / {{resource.max}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='status-value'>
|
||||
<p><input class="bar-input" name="system.resources.hitPoints.value" min="0" max='{{resource.max}}'
|
||||
value="{{resource.value}}" type="number"></p>
|
||||
<p>/</p>
|
||||
<p class="bar-label">{{resource.max}}</p>
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar'
|
||||
max='{{resource.max}}'
|
||||
value='{{resource.value}}'
|
||||
></progress>
|
||||
<div class="status-label">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.HitPoints.short"}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue