mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
[Rework] Fear Tracker (#2097)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
* rework fear tracker application, add static positions to hold the tracker, enhance token and bar display
This commit is contained in:
parent
26bcc2dddc
commit
d50545af4e
9 changed files with 457 additions and 112 deletions
|
|
@ -8,6 +8,10 @@
|
|||
value=setting.displayFear
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.fearPosition
|
||||
value=setting.fearPosition
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.displayCountdownUI
|
||||
value=setting.displayCountdownUI
|
||||
localize=true}}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,48 @@
|
|||
<div>
|
||||
<div id="resource-fear" class="{{#if isGM}}isGM{{/if}}">
|
||||
<div id="resource-fear" class="fear-tracker {{#if isGM}}isGM{{/if}}">
|
||||
{{#if isFree}}
|
||||
<div class="fear-header">
|
||||
<div class="drag-handle">
|
||||
<i class="fa-solid fa-grip-vertical"></i>
|
||||
</div>
|
||||
<span class="fear-title">{{localize 'DAGGERHEART.GENERAL.fear'}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq display 'token')}}
|
||||
{{#times max}}
|
||||
<i class="fas fa-skull {{#if (gte @this ../current)}} inactive{{/if}}" style="filter: hue-rotate(calc(({{this}}/{{../max}})*75deg))" data-index="{{this}}" data-action="setFear"></i>
|
||||
{{/times}}
|
||||
<div class="fear-tokens">
|
||||
{{#times max}}
|
||||
<a
|
||||
class="fear-token {{#if (gte @this ../current)}} inactive{{/if}}"
|
||||
style="filter: hue-rotate(calc(({{this}}/{{../max}})*75deg))"
|
||||
data-index="{{this}}" data-action="setFear"
|
||||
>
|
||||
<i class="fear-token fas fa-skull"></i>
|
||||
</a>
|
||||
{{/times}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq display 'bar')}}
|
||||
{{#if isGM}}<div class="controls control-minus {{#if (lte current 0)}} disabled{{/if}}" data-increment="-1" data-action="increaseFear">-</div>{{/if}}
|
||||
<div class="resource-bar fear-bar" style="--fear-percent: {{percent}}%">
|
||||
<span>{{current}}/{{max}}</span>
|
||||
<progress
|
||||
class='progress-bar stress-color'
|
||||
value='{{current}}'
|
||||
max='{{max}}'
|
||||
></progress>
|
||||
<h4 class="label">{{current}} / {{max}}</h4>
|
||||
</div>
|
||||
{{#if isGM}}<div class="controls control-plus {{#if (gte current max)}} disabled{{/if}}" data-increment="+1" data-action="increaseFear">+</div>{{/if}}
|
||||
{{#if isGM}}
|
||||
<div class="controls">
|
||||
<a class="{{#if (lte current 0)}} disabled{{/if}}" data-increment="-1" data-action="increaseFear"><i class="fa-solid fa-minus"></i></a>
|
||||
<a class="{{#if (gte current max)}} disabled{{/if}}" data-increment="+1" data-action="increaseFear"><i class="fa-solid fa-plus"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if isFree}}
|
||||
<a class="resize-handle">
|
||||
<i class="fa-solid fa-chevron-right" style="transform: rotate(45deg);"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue