- Changed equipped icons and made them clickable
This commit is contained in:
parent
2a36b8eaa1
commit
5be10276ca
|
|
@ -246,6 +246,28 @@ export default class M5CharacterSheet extends ActorSheet {
|
||||||
const roll = M5Roll.resistanceBody(this.actor);
|
const roll = M5Roll.resistanceBody(this.actor);
|
||||||
await roll.toMessage();
|
await roll.toMessage();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find(".change-equipped").on("click", async (event) => {
|
||||||
|
let row = event.target.parentElement;
|
||||||
|
let itemId = row.dataset["item"];
|
||||||
|
while (!itemId) {
|
||||||
|
row = row.parentElement;
|
||||||
|
if (!row) return;
|
||||||
|
itemId = row.dataset["item"];
|
||||||
|
}
|
||||||
|
|
||||||
|
const context = this.actor as any;
|
||||||
|
const item = context.items.get(itemId);
|
||||||
|
if (item.system.equipped === true) {
|
||||||
|
item.system.equipped = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
item.system.equipped = true;
|
||||||
|
}
|
||||||
|
this.render();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// Drag & Drop
|
// Drag & Drop
|
||||||
const dragDrop = new DragDrop({
|
const dragDrop = new DragDrop({
|
||||||
dragSelector: ".items-list .item",
|
dragSelector: ".items-list .item",
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,11 @@
|
||||||
width: 5rem;
|
width: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.checkbox {
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.new-skill {
|
.new-skill {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
background: rgba(0, 0, 0, 0.3);
|
background: rgba(0, 0, 0, 0.3);
|
||||||
|
|
@ -200,10 +205,10 @@
|
||||||
|
|
||||||
button.roll-button {
|
button.roll-button {
|
||||||
background: url(/icons/svg/d20-black.svg) no-repeat;
|
background: url(/icons/svg/d20-black.svg) no-repeat;
|
||||||
background-size: 24px 24px;
|
background-size: 1rem 1rem;
|
||||||
border: #000000 solid 0px;
|
border: #000000 solid 0px;
|
||||||
width: 26px;
|
width: 1rem;
|
||||||
height: 26px;
|
height: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.spell-process {
|
span.spell-process {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<div class="flexpart-header">
|
<div class="flexpart-header">
|
||||||
<img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">
|
<img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">
|
||||||
{{localize "midgard5.gear"}}
|
{{localize "midgard5.gear"}}
|
||||||
(alle <input id="data.info.showAllItems" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}}>)
|
(alle <input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}}>)
|
||||||
</div>
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<thead class="theader">
|
<thead class="theader">
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<th class="title">{{localize "TYPES.Item.item"}}</th>
|
<th class="title">{{localize "TYPES.Item.item"}}</th>
|
||||||
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
|
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
|
||||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||||
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
|
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
|
||||||
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
|
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
|
||||||
<th class="title"> </th>
|
<th class="title"> </th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -66,13 +66,15 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<img src="/systems/midgard5/assets/icons/icon/confirmed.svg" class="table-icon">
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
{{else}}
|
||||||
|
<i class="fa-regular fa-circle"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class="fixed-value">{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
||||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
@ -107,13 +109,15 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<img src="/systems/midgard5/assets/icons/icon/confirmed.svg" class="table-icon">
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
{{else}}
|
||||||
|
<i class="fa-regular fa-circle"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class="fixed-value">{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
||||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
@ -152,13 +156,15 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<img src="/systems/midgard5/assets/icons/icon/confirmed.svg" class="table-icon">
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
{{else}}
|
||||||
|
<i class="fa-regular fa-circle"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class="fixed-value">{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
||||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue