Add the macro trigger into the Items tab, and localize the trigger button for attributes (closes #85)
This commit is contained in:
parent
a55748d6fc
commit
a9567c200a
5 changed files with 25 additions and 5 deletions
|
|
@ -65,6 +65,8 @@
|
||||||
"resizable": "Resizable",
|
"resizable": "Resizable",
|
||||||
"not-resizable": "Not Resizable",
|
"not-resizable": "Not Resizable",
|
||||||
"macro-is-in-use": "The Macro is used by {count} items/attributes in the world or Actors, the items will lose their ability to use the macro.",
|
"macro-is-in-use": "The Macro is used by {count} items/attributes in the world or Actors, the items will lose their ability to use the macro.",
|
||||||
|
"roll": "Roll",
|
||||||
|
"use": "Use",
|
||||||
"item": {
|
"item": {
|
||||||
"weight": "Weight",
|
"weight": "Weight",
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
|
|
|
||||||
|
|
@ -382,6 +382,7 @@ export class PlayerSheet extends
|
||||||
weight: config.weightFormatter(item.system.quantifiedWeight),
|
weight: config.weightFormatter(item.system.quantifiedWeight),
|
||||||
isExpanded: this.#expandedItems.has(item.uuid),
|
isExpanded: this.#expandedItems.has(item.uuid),
|
||||||
canExpand: item.system.description.length > 0,
|
canExpand: item.system.description.length > 0,
|
||||||
|
trigger: item.system.trigger,
|
||||||
};
|
};
|
||||||
|
|
||||||
ctx.description = ``;
|
ctx.description = ``;
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,8 @@
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: min-content auto 1fr 50px auto;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
background: var(--item-card-header-background);
|
background: var(--item-card-header-background);
|
||||||
|
|
@ -154,6 +154,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
|
|
@ -164,10 +165,15 @@
|
||||||
opacity: 90%;
|
opacity: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
input, button {
|
input, button {
|
||||||
background: var(--item-card-header-input-background);
|
background: var(--item-card-header-input-background);
|
||||||
color: var(--item-card-header-input-colour);
|
color: var(--item-card-header-input-colour);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
&:disabled {
|
&:disabled {
|
||||||
color: var(--item-card-header-disabled-input-colour);
|
color: var(--item-card-header-disabled-input-colour);
|
||||||
|
|
@ -175,14 +181,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.expand-button {
|
button {
|
||||||
border: none;
|
border: none;
|
||||||
aspect-ratio: 1;
|
|
||||||
|
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
filter: brightness(150%);
|
filter: brightness(150%);
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.expand-button {
|
||||||
|
aspect-ratio: 1;
|
||||||
|
|
||||||
&[data-expanded="true"] {
|
&[data-expanded="true"] {
|
||||||
rotate: 180deg;
|
rotate: 180deg;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
type="button"
|
type="button"
|
||||||
data-action="executeTrigger"
|
data-action="executeTrigger"
|
||||||
>
|
>
|
||||||
Roll
|
{{ localize "taf.misc.roll" }}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<input
|
<input
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,14 @@
|
||||||
<span class="name">{{ name }}</span>
|
<span class="name">{{ name }}</span>
|
||||||
<span class="subtitle">{{ weight }}</span>
|
<span class="subtitle">{{ weight }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{{#if trigger}}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-action="executeTrigger"
|
||||||
|
>
|
||||||
|
{{ localize "taf.misc.use" }}
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
<input
|
<input
|
||||||
id="{{uuid}}-quantity"
|
id="{{uuid}}-quantity"
|
||||||
type="number"
|
type="number"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue