mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +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;
|
||||
}
|
||||
|
||||
//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() {
|
||||
return `.Item.${this.item.id}.Action.${this.id}`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,10 +158,12 @@ Parameters:
|
|||
<div class="item-button">
|
||||
{{#if (and (eq action.type 'beastform') @root.beastformActive)}}
|
||||
<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"}}
|
||||
</button>
|
||||
{{else}}
|
||||
<button type="button" data-action="useItem" data-item-uuid="{{action.uuid}}">
|
||||
<i class="fa-solid {{action.typeIcon}} action-icon"></i>
|
||||
{{action.name}}
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue