mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] TokenConfig Actor Size Edit (#1470)
* Added the select and handliing * Fixed so tokenPreview works with tokenSize * Correction for prototypeToken * Extracted common logic to token-config-mixin.mjs * Update templates/sheets-settings/token-config/appearance.hbs Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com> --------- Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
parent
c63ba3b41d
commit
50a307b271
4 changed files with 167 additions and 85 deletions
|
|
@ -10,22 +10,31 @@
|
|||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
<fieldset>
|
||||
<legend>{{localize "Token Size"}}</legend>
|
||||
{{#if usesActorSize}}
|
||||
<div class="form-group lim">
|
||||
<label>{{localize "Size Category"}}</label>
|
||||
|
||||
<select id="dhTokenSize">
|
||||
{{selectOptions tokenSizes selected=tokenSize valueAttr="id" labelAttr="label" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="form-group slim" {{#if actorSizeUsed}}data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.actorSizeUsed"}}"{{/if}}>
|
||||
<label>
|
||||
{{localize "TOKEN.Dimensions"}} <span class="units">({{localize "GridSpaces"}})</span>
|
||||
{{#if actorSizeUsed}}
|
||||
<i class="fa-solid fa-lock"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
<div class="form-fields">
|
||||
<label for="{{rootId}}-width">{{localize "DOCUMENT.FIELDS.width.label"}}</label>
|
||||
{{formInput fields.width value=source.width id=(concat rootId "-width") disabled=actorSizeUsed}}
|
||||
<label for="{{rootId}}-height">{{localize "DOCUMENT.FIELDS.height.label"}}</label>
|
||||
{{formInput fields.height value=source.height id=(concat rootId "-height") disabled=actorSizeUsed}}
|
||||
<div id="tokenSizeDimensions" class="form-group slim" {{#if actorSizeDisable}}data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.actorSizeUsed"}}"{{/if}}>
|
||||
<label>
|
||||
{{localize "TOKEN.Dimensions"}} <span class="units">({{localize "GridSpaces"}})</span>
|
||||
<i class="fa-solid fa-lock" {{#unless actorSizeDisable}}style="opacity: 0%;"{{/unless}}></i>
|
||||
</label>
|
||||
<div class="form-fields">
|
||||
<label for="{{rootId}}-width">{{localize "DOCUMENT.FIELDS.width.label"}}</label>
|
||||
{{formInput fields.width value=source.width id=(concat rootId "-width") disabled=actorSizeDisable}}
|
||||
<label for="{{rootId}}-height">{{localize "DOCUMENT.FIELDS.height.label"}}</label>
|
||||
{{formInput fields.height value=source.height id=(concat rootId "-height") disabled=actorSizeDisable}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{#if shapes}}
|
||||
{{formGroup fields.shape value=source.shape choices=shapes classes="slim" rootId=rootId}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue