mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Action buttons have icons. Pretty Iconic
This commit is contained in:
parent
d2f9b3912b
commit
e0b45ce8f4
2 changed files with 8 additions and 0 deletions
|
|
@ -141,6 +141,12 @@ export function ActionMixin(Base) {
|
||||||
return this.documentName;
|
return this.documentName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Getter for icons
|
||||||
|
get typeIcon() {
|
||||||
|
const config = CONFIG.DH.ACTIONS.actionTypes[this.type];
|
||||||
|
return config?.icon || 'fa-question'; // Fallback icon just in case
|
||||||
|
}
|
||||||
|
|
||||||
get relativeUUID() {
|
get relativeUUID() {
|
||||||
return `.Item.${this.item.id}.Action.${this.id}`;
|
return `.Item.${this.item.id}.Action.${this.id}`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,10 +158,12 @@ Parameters:
|
||||||
<div class="item-button">
|
<div class="item-button">
|
||||||
{{#if (and (eq action.type 'beastform') @root.beastformActive)}}
|
{{#if (and (eq action.type 'beastform') @root.beastformActive)}}
|
||||||
<button type="button" data-action="cancelBeastform" data-item-uuid="{{action.uuid}}">
|
<button type="button" data-action="cancelBeastform" data-item-uuid="{{action.uuid}}">
|
||||||
|
<i class="fa-solid {{action.typeIcon}} action-icon"></i>
|
||||||
{{localize "DAGGERHEART.ACTORS.Character.cancelBeastform"}}
|
{{localize "DAGGERHEART.ACTORS.Character.cancelBeastform"}}
|
||||||
</button>
|
</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
<button type="button" data-action="useItem" data-item-uuid="{{action.uuid}}">
|
<button type="button" data-action="useItem" data-item-uuid="{{action.uuid}}">
|
||||||
|
<i class="fa-solid {{action.typeIcon}} action-icon"></i>
|
||||||
{{action.name}}
|
{{action.name}}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue