Make weapons rollable from the character sheet
This commit is contained in:
parent
c1c0f41743
commit
3d272f2b92
13 changed files with 173 additions and 66 deletions
|
@ -17,7 +17,8 @@
|
|||
{{/if}}
|
||||
|
||||
{{!-- image --}}
|
||||
<div class="ds4-item-list__image" style="background-image: url('{{itemData.img}}')" title="{{itemData.name}}"></div>
|
||||
<div class="ds4-item-list__image{{#if itemData.data.rollable}} ds4-item-list__image--rollable rollable-item{{/if}}"
|
||||
style="background-image: url('{{itemData.img}}')" title="{{itemData.name}}"></div>
|
||||
|
||||
{{!-- amount --}}
|
||||
{{#if hasQuantity}}
|
||||
|
|
19
src/templates/common/simple-select-form.hbs
Normal file
19
src/templates/common/simple-select-form.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{!--
|
||||
!-- Render a simple form with a single select element. It uses the default form classes of Foundry VTT.
|
||||
!-- @param identifier: The identifier to use as id for the select element. Can be used to query the value later on.
|
||||
!-- @param label: Text to display as the label for the select element.
|
||||
!-- @param options: Key-value pairs that describe the options. The keys are used for the value attribute of the
|
||||
options, the values are used as content.
|
||||
--}}
|
||||
<form class="ds4-simple-form">
|
||||
<div class="form-group">
|
||||
<label for="{{identifier}}">{{label}}</label>
|
||||
<div class="form-fields">
|
||||
<select name="{{identifier}}" id="{{identifier}}">
|
||||
{{#each options as | value key |}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue