Implement the toggle for capacity usage. (closes #156)

This commit is contained in:
Oliver-Akins 2024-04-17 22:31:45 -06:00
parent 6d41a33b0c
commit 48ceade1d1
5 changed files with 47 additions and 4 deletions

View file

@ -0,0 +1,24 @@
.dotdungeon.style-v3 {
input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border-radius: 2px;
margin: 0;
cursor: pointer;
background: var(--elevation-8dp-bg);
position: relative;
&:checked::before {
content: "";
background: var(--checkbox-checked);
border-radius: 3px;
$margin: 4px;
top: $margin;
bottom: $margin;
left: $margin;
right: $margin;
position: absolute;
}
}
}

View file

@ -5,6 +5,7 @@
/* Element-Styling */ /* Element-Styling */
@use "./elements/utilities.scss"; @use "./elements/utilities.scss";
@use "./elements/button.scss"; @use "./elements/button.scss";
@use "./elements/checkbox.scss";
@use "./elements/select.scss"; @use "./elements/select.scss";
@use "./elements/text-input.scss"; @use "./elements/text-input.scss";
@use "./elements/number-input.scss"; @use "./elements/number-input.scss";

View file

@ -60,6 +60,11 @@
@extend %flex-col; @extend %flex-col;
.capacity { .capacity {
&--usage, &--quantity {
display: flex;
align-items: center;
}
&--calculated { &--calculated {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View file

@ -4,4 +4,6 @@
--surface: #121212; --surface: #121212;
--on-surface: white; --on-surface: white;
--checkbox-checked: #00d300;
} }

View file

@ -5,10 +5,21 @@
</div> </div>
{{/if}} {{/if}}
{{#if isGM}} {{#if isGM}}
<div class="capacity-usage panel"> <div class="capacity--usage panel">
<label
for="{{meta.idp}}-{{item.uuid}}-uses-inventory-slot"
>
Uses Capacity? Uses Capacity?
<br> <br>
(GM Only) (GM Only)
</label>
<div class="grow"></div>
<input
type="checkbox"
id="{{meta.idp}}-{{item.uuid}}-uses-inventory-slot"
name="system.uses_inventory_slot"
{{checked system.uses_inventory_slot}}
>
</div> </div>
<div class="quantity-capacity panel"> <div class="quantity-capacity panel">
Quantity Affects Capacity? Quantity Affects Capacity?