daggerheart/templates/dialogs/dice-roll/costSelection.hbs
Dapoulp a8862d40d2
Fix min to display slider (#619)
* Fix min to display slider

* Fix min to display slider
2025-08-05 20:15:56 -03:00

30 lines
No EOL
1.7 KiB
Handlebars

<fieldset class="one-column">
<legend>{{localize 'DAGGERHEART.GENERAL.Cost.single'}}</legend>
<ul>
{{#if uses}}
<li class="scalable-input">
<div class="form-group span-2">
<div class="form-fields nest-inputs">
<input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
<label for="uses.enabled">Uses{{#if uses.consumeOnSuccess}}<span class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.consumeOnSuccess.short"}}{{/if}}</span></label>
</div>
</div>
<label class="modifier-label">{{uses.value}}/{{formulaValue uses.max @root.rollConfig.data}}</label>
</li>
{{/if}}
{{#each costs as | cost index |}}
<li class="scalable-input">
<div class="form-group{{#unless (and scalable maxStep)}} span-2{{/unless}}">
<div class="form-fields nest-inputs">
<input name="costs.{{index}}.enabled" type="checkbox"{{#if enabled}} checked{{/if}}>
<label>{{label}}{{#if cost.consumeOnSuccess}}<span class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.consumeOnSuccess.short"}}</span>{{/if}}</label>
</div>
</div>
{{#if (and scalable maxStep)}}
<input type="range" value="{{scale}}" min="0" max="{{maxStep}}" step="1" name="costs.{{index}}.scale" data-tooltip="{{localize "DAGGERHEART.ACTIONS.Settings.cost.stepTooltip" step=step}}" data-tooltip-direction="UP">
{{/if}}
<label class="modifier-label">{{total}}/{{max}}</label>
</li>
{{/each}}
</ul>
</fieldset>