diff --git a/css/style.min.css b/css/style.min.css index 51345bc4..6e6e14fa 100644 --- a/css/style.min.css +++ b/css/style.min.css @@ -6428,7 +6428,8 @@ template { pointer-events: auto; z-index: 20; } -:root body.vtt.game.system-eunos-blades #blades-overlay, :root body.vtt.game.system-eunos-blades #blades-overlay .overlay-section { +:root body.vtt.game.system-eunos-blades #blades-overlay, :root body.vtt.game.system-eunos-blades #blades-overlay > * { + display: block; position: absolute; top: 0; left: 0; @@ -6439,15 +6440,633 @@ template { perspective: 500px; transform-style: preserve-3d; } -:root body.vtt.game.system-eunos-blades #blades-overlay #testSquare, :root body.vtt.game.system-eunos-blades #blades-overlay .overlay-section #testSquare { +:root body.vtt.game.system-eunos-blades #blades-overlay { + /* KEYS */ + /* CLOCKS */ + /* CONTROLS */ +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container { + position: absolute; + perspective: 500px; + transform-style: preserve-3d; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container * { + perspective: 500px; + transform-style: preserve-3d; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="1"] { + --key-height: 455px; + --key-width: 202px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="1"] .clock-key .key-label { + top: 0px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="1"] .clock-key .key-image-container .clock-container:nth-of-type(1) { + left: 101px; + top: 99px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="2"] { + --key-height: 624.438px; + --key-width: 202px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="2"] .clock-key .key-label { + top: 100px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) { + left: 101px; + top: 99px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) { + left: 101px; + top: 279px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="3"] { + --key-height: 915px; + --key-width: 280px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="3"] .clock-key .key-label { + top: 0px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(1) { + left: 140px; + top: 99px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(2) { + left: 74px; + top: 211px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(3) { + left: 206px; + top: 211px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="4"] { + --key-height: 1140px; + --key-width: 376px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="4"] .clock-key .key-label { + top: -100px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(1) { + left: 188px; + top: 99px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(2) { + left: 101px; + top: 185px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(3) { + left: 275px; + top: 185px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(4) { + left: 188px; + top: 273px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] { + --key-height: 1140px; + --key-width: 376px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] .clock-key .key-label { + top: 0px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(1) { + left: 188px; + top: 99px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(2) { + left: 101px; + top: 185px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(3) { + left: 275px; + top: 185px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(4) { + left: 188px; + top: 273px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(5) { + left: 188px; + top: 452px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] { + --key-height: 1150px; + --key-width: 376px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-label { + top: 250px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(1) { + left: 188px; + top: 99px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(2) { + left: 101px; + top: 185px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(3) { + left: 275px; + top: 185px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(4) { + left: 188px; + top: 273px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(5) { + left: 188px; + top: 452px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(6) { + left: 188px; + top: 683px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="1"] .clock-key .key-image-container.one-key-image-container { + --clock-size: 168px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="1"] .clock-key .key-image-container.one-key-image-container .clock-container { + top: 108px; + left: 110px; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key { + visibility: hidden; + position: absolute; + display: block; + height: 100px; + width: 100px; + transform: translate(-50%, -50%); + top: 50%; + left: 50%; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key > * { + position: absolute; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-label { + font-family: var(--font-decorative); + font-size: 4rem; + top: unset; + z-index: 20; + width: 100%; + pointer-events: all; + color: var(--blades-white-bright); + text-shadow: 0 0 15px var(--blades-black-dark), 0 0 15px var(--blades-black-dark), 0 0 15px var(--blades-black-dark), 0 0 15px var(--blades-black-dark); + left: 0; + position: absolute; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-label:hover { + color: var(--blades-gold-bright) !important; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-image-container { + height: var(--key-height); + width: var(--key-width); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-image-container .key-image { + height: var(--key-height); + width: var(--key-width); + z-index: 1; + overflow: visible; + filter: drop-shadow(0px 0px 10px var(--blades-white-bright)) drop-shadow(30px 30px 10px var(--blades-black-dark)) brightness(0.5); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-image-container .key-image .key-bg { + fill: var(--blades-black); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-image-container .key-image .metallic-overlay { + height: var(--key-height); + width: var(--key-width); + filter: url(#metallicFilter) blur(1px); + fill: var(--blades-grey-dark); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container { + position: absolute; + top: 0px; + left: 0px; + display: flex; + align-items: center; + justify-content: center; + overflow: visible; + height: var(--clock-size, 110px); + width: var(--clock-size, 110px); + transform: translate(-50%, -50%) !important; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock { + position: relative; + overflow: visible; + pointer-events: all !important; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock * { + height: var(--clock-size, 110px); + width: var(--clock-size, 110px); + pointer-events: none; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-frame, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-fill, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow { + position: absolute; + top: 0px; + left: 0px; + height: 100%; + width: 100%; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-label { + position: absolute; + transform: translate(-50%, -50%); + top: 50%; + left: 50%; + z-index: 5; + font-size: 24px; + font-family: var(--font-emphasis-narrow); + font-weight: bold; + color: var(--blades-white-bright); + text-shadow: var(--text-shadow-dark-strong); + text-align: center; + white-space: nowrap; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-frame { + z-index: 3; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-fill { + z-index: 2; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow { + z-index: 4; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow { + transform-origin: 50% 50%; + scale: var(--clock-glow-mult, 3); + background-repeat: no-repeat; + background-position: center calc(50% - var(--clock-glow-shift, 7%)); + background-size: cover; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow.clock-glow-white { + background-image: url("../assets/animations/clock-flare-white.webp"); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow.clock-glow-red { + background-image: url("../assets/animations/clock-flare-red.webp"); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow.clock-glow-yellow { + background-image: url("../assets/animations/clock-flare-yellow.webp"); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-glow.clock-glow-blue { + background-image: url("../assets/animations/clock-flare-blue.webp"); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="2"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="2"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="2"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="2"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="3"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="3"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="3"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="3"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="3"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="3"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="4"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="4"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 50%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="4"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="4"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="4"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="4"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 50%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="4"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="4"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="5"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="5"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 33.7545273633%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="5"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="5"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 86.3257107984% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="5"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="5"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 13.6742892016% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="5"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="5"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 33.7545273633%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="5"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="5"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="6"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="6"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 21.1335160157%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="6"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="6"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="6"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="6"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="6"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="6"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="6"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="6"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 21.1335160157%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="6"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="6"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 10.1279545793%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 61.4118255758%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 74.0779156508% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 25.9220843492% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 61.4118255758%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 10.1279545793%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="7"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="7"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 0.0023162861% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 50%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 100% 0.0023162861%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 99.9976837139% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 50%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 99.9976837139%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="8"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="8"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 91.9532272571% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 41.1839163374%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 68.1979287832% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 31.8020712168% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 41.1839163374%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 8.0467727429% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="9"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="9"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 86.3257107984% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 33.7545273633%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 66.2454726367%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 86.3257107984% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 13.6742892016% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 66.2454726367%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 33.7545273633%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 13.6742892016% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="10"][data-max="10"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="10"][data-max="10"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 82.1318586828% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 27.1665285834%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 57.1886997705%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 93.3234032431%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 64.6808671851% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 35.3191328149% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 93.3234032431%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 57.1886997705%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 27.1665285834%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="10"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="10"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 17.8681413172% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="11"][data-max="11"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="11"][data-max="11"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="1"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 78.8664839843% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="2"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 21.1335160157%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="3"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 50%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="4"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="5"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 78.8664839843% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="6"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="7"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 21.1335160157% 100%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="8"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 78.8664839843%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="9"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 50%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="10"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="10"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 21.1335160157%, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="11"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="11"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 21.1335160157% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="12"][data-max="12"] .clock-glow, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock[data-value="12"][data-max="12"] .clock-fill { + clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 50%); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container.controls-hidden .clock-key-controls { + display: none !important; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container.controls-hidden .clock-controls { + display: none !important; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls { + --row-height: 25px; + --row-gap: 2px; + position: absolute; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: center; + gap: var(--row-gap); + z-index: 50; + border-radius: 5px; + height: calc(var(--row-height) * 3 + var(--row-gap) * 2); + width: 100%; + transform: translate(-50%, -50%); + top: 50%; + left: 50%; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls.clock-key-controls, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls.clock-key-controls { + position: absolute; + top: unset; + bottom: 20%; + left: 50%; + width: 80%; + transform: translate(-50%, 0%); + height: calc(var(--row-height) * 3 + var(--row-gap) * 2); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-button, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-button { + pointer-events: all; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls i, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls i { + opacity: 1; + text-shadow: var(--text-shadow-dark-strong); + pointer-events: none; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls select, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls input, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls select, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls input { + pointer-events: all; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls select, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls select { + width: auto; + flex-basis: auto; + max-width: 75%; + flex-grow: 1; + flex-shrink: 1; + line-height: var(--row-height); + appearance: none; /* Remove default select dropdown arrow */ + -webkit-appearance: none; /* Remove default select dropdown arrow for Chrome and Safari */ + -moz-appearance: none; /* Remove default select dropdown arrow for Firefox */ + background: transparent; /* Make the select element transparent to hide the arrow */ +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls:not(.controls-hidden), +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls:not(.controls-hidden) { + background: var(--blades-black-fade); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row { + display: flex; + flex-direction: row; + justify-content: space-evenly; + align-items: center; + height: var(--row-height); + max-height: var(--row-height); + width: 100%; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row *, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row *, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row *, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row * { + height: var(--row-height); + max-height: var(--row-height); + width: unset; + position: static; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.toggle-controls-row, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.toggle-controls-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.toggle-controls-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.toggle-controls-row { + position: absolute; + top: calc(-1 * var(--row-height)); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.toggle-controls-row.clock-key-controls-row, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.toggle-controls-row.clock-key-controls-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.toggle-controls-row.clock-key-controls-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.toggle-controls-row.clock-key-controls-row { + bottom: calc(-2 * var(--row-height)); + top: unset; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.name-row, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.name-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.name-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.name-row { + width: 100%; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.name-row > .clock-controls-name, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.name-row > .clock-controls-name, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.name-row > .clock-controls-name, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.name-row > .clock-controls-name { + height: var(--row-height); + max-height: var(--row-height); + width: 100%; + pointer-events: all !important; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.select-row, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.select-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.select-row, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.select-row { + justify-content: stretch; +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.button-row .toggle-icon i, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.button-row .toggle-icon i, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.button-row .toggle-icon i, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.button-row .toggle-icon i { + width: var(--row-height); +} +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-controls-row.button-row .toggle-icon .tooltip, :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-controls .clock-key-controls-row.button-row .toggle-icon .tooltip, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-controls-row.button-row .toggle-icon .tooltip, +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-controls .clock-key-controls-row.button-row .toggle-icon .tooltip { position: absolute; - top: 200px; - left: 300px; - background: blue; - height: 200px; - width: 200px; } -:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container, :root body.vtt.game.system-eunos-blades #blades-overlay .overlay-section .clock-key-container { +:root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container, +:root body.vtt.game.system-eunos-blades #blades-overlay .overlay-section .clock-key-container, +:root body.vtt.game.system-eunos-blades #blades-overlay .svg-defs .clock-key-container { visibility: hidden; } :root body.vtt.game.system-eunos-blades #clocks-overlay { diff --git a/module/BladesActor.js b/module/BladesActor.js index d07418ef..6ad588cf 100644 --- a/module/BladesActor.js +++ b/module/BladesActor.js @@ -300,6 +300,9 @@ class BladesActor extends Actor { // #endregion // #region SubItemControl Implementation ~ get subItems() { return Array.from(this.items); } + getSubItemsOfType(itemType) { + return this.items.filter((item) => item.type === itemType); + } get activeSubItems() { return this.items.filter((item) => !item.hasTag(Tag.System.Archived)); } get archivedSubItems() { return this.items.filter((item) => item.hasTag(Tag.System.Archived)); } _checkItemPrereqs(item) { @@ -741,7 +744,7 @@ class BladesActor extends Actor { parentActor; get isSubActor() { return this.parentActor !== undefined; } // #endregion - // #region BladesRoll Implementation + // #region BladesRoll Implementation ~ get rollModsData() { return BladesRollMod.ParseDocRollMods(this); } @@ -783,9 +786,11 @@ class BladesActor extends Actor { return this.type; } get rollPrimaryImg() { return this.img; } + // #endregion + // #endregion // #region BladesCrew Implementation ~ // #endregion - // #region PREPARING DERIVED DATA + // #region PREPARING DERIVED DATA ~ prepareDerivedData() { if (BladesActor.IsType(this, BladesActorType.pc)) { this._preparePCData(this.system); diff --git a/module/blades.js b/module/blades.js index 5cd2f1ec..6dce8863 100644 --- a/module/blades.js +++ b/module/blades.js @@ -579,10 +579,9 @@ Hooks.once("ready", async () => { initDOMStyles(); initCanvasStyles(); initTinyMCEStyles(); - await BladesDirector.getInstance().renderOverlay(); + await BladesDirector.getInstance().renderOverlay_SocketResponse(); BladesDirector.InitSockets(); BladesRoll.InitSockets(); - BladesClockKeeper.InitSockets(); }); // #endregion ▄▄▄▄▄ SYSTEM INITIALIZATION ▄▄▄▄▄ // #region ░░░░░░░[SocketLib]░░░░ SocketLib Initialization ░░░░░░░ ~ diff --git a/module/classes/BladesClocks.js b/module/classes/BladesClocks.js index 3391a1f6..e95db86b 100644 --- a/module/classes/BladesClocks.js +++ b/module/classes/BladesClocks.js @@ -21,6 +21,10 @@ class BladesClockKey extends BladesTargetLink { .forEach(registerClockKeys); socketlib.system.register("pull_SocketCall", BladesClockKey.pull_SocketResponse.bind(this)); socketlib.system.register("drop_SocketCall", BladesClockKey.drop_SocketResponse.bind(this)); + return loadTemplates([ + "systems/eunos-blades/templates/components/clock-key.hbs", + "systems/eunos-blades/templates/components/clock.hbs" + ]); } static ApplySchemaDefaults(schemaData) { // Ensure all properties of Schema are provided @@ -72,26 +76,6 @@ class BladesClockKey extends BladesTargetLink { set isActive(val) { this.updateTarget("isActive", U.pBool(val)); } get isNameVisible() { return this.data.isNameVisible; } set isNameVisible(val) { this.updateTarget("isNameVisible", U.pBool(val)); } - _keySwingTimeline; - get keySwingTimeline() { - if (!this.elem) { - return undefined; - } - if (!this._keySwingTimeline) { - this._keySwingTimeline = U.gsap.effects.keySwing(this.elem).pause(); - } - return this._keySwingTimeline; - } - _keyControlZoomTimeline; - get keyControlZoomTimeline() { - if (!this.elem) { - return undefined; - } - if (!this._keyControlZoomTimeline) { - this._keyControlZoomTimeline = U.gsap.effects.keyControlZoom(this.elem).pause(); - } - return this._keyControlZoomTimeline; - } get clocksData() { return this.data.clocksData; } get displayMode() { if (game.user.isGM && this.isShowingControls) { @@ -175,7 +159,7 @@ class BladesClockKey extends BladesTargetLink { // #endregion // #region HTML INTERACTION ~ async getHTML() { - return await renderTemplate("systems/eunos-blades/templates/overlays/clock-key.hbs", this); + return await renderTemplate("systems/eunos-blades/templates/components/clock-key.hbs", this); } get elem() { return $(`#${this.id}`)[0]; @@ -217,17 +201,27 @@ class BladesClockKey extends BladesTargetLink { setTimeout(async () => resolve(await this.initClockKeyElem(displayMode)), 1000); }); } + const self = this; const { elem } = this; const { keyTweenVars, keyContTweenVars } = this.getDisplayMode(displayMode); const keyImgContainer = $(this.elem).find(".key-image-container")[0]; return new Promise((resolve) => { - U.gsap.timeline() + const tl = U.gsap.timeline() .set(keyImgContainer, keyContTweenVars) - .set(elem, keyTweenVars) - .to(elem, { - autoAlpha: 1, - duration: 0.5 - }).then(() => { resolve(); }); + .set(elem, keyTweenVars); + if (this.isVisible) { + tl.to(elem, { + autoAlpha: 1, + duration: 0.5, + onComplete() { + self.keySwingTimeline?.play(); + resolve(); + } + }); + } + else { + resolve(); + } }); } // Given a display mode ("full", "clocks", or a clock index number), will return a GSAP effects @@ -360,7 +354,43 @@ class BladesClockKey extends BladesTargetLink { }); } // #endregion - // #region ANIMATIONS (Client-Side Only AND Socket-Triggered) + // #region ANIMATED UPDATES (Both GM-Only AND Socket Calls) + // #region > TIMELINES ~ + _keySwingTimeline; + get keySwingTimeline() { + if (!this.elem) { + return undefined; + } + if (!$(this.elem).parents("#blades-overlay").length) { + return undefined; + } + if (!this._keySwingTimeline) { + this._keySwingTimeline = U.gsap.effects.keySwing(this.elem).pause(); + } + return this._keySwingTimeline; + } + _keyControlZoomTimeline; + get keyControlZoomTimeline() { + if (!this.elem) { + return undefined; + } + if (!this._keyControlZoomTimeline) { + this._keyControlZoomTimeline = U.gsap.effects.keyControlZoom(this.elem).pause(); + } + return this._keyControlZoomTimeline; + } + _hoverOverTimeline; + get hoverOverTimeline() { + if (!this.elem) { + return undefined; + } + if (!this._hoverOverTimeline) { + this._hoverOverTimeline = U.gsap.effects.hoverOverClockKey(this); + } + return this._hoverOverTimeline; + } + // #endregion + // #region > GM-ONLY CLIENT-SIDE ANIMATIONS ~ showControls() { if (!game.user.isGM) { return; @@ -370,6 +400,7 @@ class BladesClockKey extends BladesTargetLink { } this.keySwingTimeline?.tweenTo(1, { duration: 0.25, ease: "none" }); this.keyControlZoomTimeline?.play(); + game.eunoblades.ClockKeeper.showClockKeyControls(this.id); } hideControls() { if (!game.user.isGM) { @@ -380,7 +411,10 @@ class BladesClockKey extends BladesTargetLink { } this.keySwingTimeline?.resume(); this.keyControlZoomTimeline?.reverse(); + game.eunoblades.ClockKeeper.hideClockKeyControls(this.id); } + // #endregion + // #region > SOCKET CALLS: _SocketCall / static _SocketResponse / _Animation drop_Animation() { if (!this.elem) { return; @@ -395,7 +429,11 @@ class BladesClockKey extends BladesTargetLink { if (!this.elem) { return; } + if (!$(this.elem).parents("#blades-overlay").length) { + return; + } socketlib.system.executeForEveryone("drop_SocketCall", this.id); + this.updateTarget("isVisible", true); } static drop_SocketResponse(keyID) { const key = game.eunoblades.ClockKeys.get(keyID); @@ -417,7 +455,11 @@ class BladesClockKey extends BladesTargetLink { if (!this.elem) { return; } + if (!$(this.elem).parents("#blades-overlay").length) { + return; + } socketlib.system.executeForEveryone("pull_SocketCall", this.id); + this.updateTarget("isVisible", false); } static pull_SocketResponse(keyID) { const key = game.eunoblades.ClockKeys.get(keyID); @@ -426,6 +468,7 @@ class BladesClockKey extends BladesTargetLink { } key.pull_Animation(); } + // #endregion // #endregion // #region Adding & Removing Clocks ~ async updateClockIndices() { @@ -544,6 +587,7 @@ class BladesClock extends BladesTargetLink { } return returnVals; } + // #endregion // #region HTML INTERACTION ~ get elem() { return $(`[data-id="${this.id}"`)[0]; @@ -561,7 +605,21 @@ class BladesClock extends BladesTargetLink { return "right"; } // #endregion - // #region Adding/Removing Clock Segments + // #region ANIMATED UPDATES (Both GM-Only AND Socket Calls) + // #region > TIMELINES ~ + _hoverOverTimeline; + get hoverOverTimeline() { + if (!this.elem) { + return undefined; + } + if (!this._hoverOverTimeline) { + this._hoverOverTimeline = U.gsap.effects.hoverOverClock(this); + } + return this._hoverOverTimeline; + } + // #endregion + // #endregion + // #region Adding/Removing Clock Segments ~ // Returns number of segments beyond max (or 0, if max not met) async fillSegments(count) { // Amount added beyond max: @@ -592,7 +650,7 @@ class BladesClock extends BladesTargetLink { this.parentKey?.updateClockIndices(); } } -export const ApplyClockListeners = async (html, namespace) => { +const ApplyClockListeners = async (html, namespace) => { eLog.checkLog3("ApplyListeners", "ApplyClockListeners", { html, find: html.find(".clock") }); // Step One: Find any clock keys and initialize them await Promise.all(Array.from(html.find(".clock-key")) @@ -609,8 +667,8 @@ export const ApplyClockListeners = async (html, namespace) => { return; } const prop = $(el).data("prop"); - eLog.checkLog3("clockControls", "Toggle Event", { source, el, prop, curVal: source.getTargetProp(prop) }); - await source.updateTarget(prop, !source.getTargetProp(prop)); + eLog.checkLog3("clockControls", "Toggle Event", { source, el, prop, curVal: source.data[prop] }); + await source.updateTarget(prop, !source.data[prop]); if (prop === "isShowingControls") { if (source instanceof BladesClockKey) { const key = source; @@ -631,7 +689,7 @@ export const ApplyClockListeners = async (html, namespace) => { return; } const prop = $(el).data("prop"); - eLog.checkLog3("clockControls", "Set Event", { val, source, prop, curVal: source.getTargetProp(prop) }); + eLog.checkLog3("clockControls", "Set Event", { val, source, prop, curVal: source.data[prop] }); source.updateTarget(prop, val); } // Add listeners and animation timelines to clock keys @@ -789,3 +847,4 @@ export const ApplyClockListeners = async (html, namespace) => { }); }; export default BladesClockKey; +export { BladesClock, ApplyClockListeners }; diff --git a/module/classes/BladesDirector.js b/module/classes/BladesDirector.js index 829ce45b..cdca1259 100644 --- a/module/classes/BladesDirector.js +++ b/module/classes/BladesDirector.js @@ -11,14 +11,9 @@ class BladesDirector { return (BladesDirector.instance ??= new BladesDirector()); } static async Initialize() { - // Trigger the instantiation of the Singleton by calling the getter - const director = BladesDirector.getInstance(); - // Initialize the overlay element once canvas loaded - Hooks.on("canvasReady", async () => { director.renderOverlay(); }); // Return asynchronous template loading. return loadTemplates([ "systems/eunos-blades/templates/overlay/blades-overlay.hbs", - "systems/eunos-blades/templates/overlay/clock-key.hbs", "systems/eunos-blades/templates/overlay/location.hbs", "systems/eunos-blades/templates/overlay/score-panel.hbs", "systems/eunos-blades/templates/overlay/npc-portrait.hbs", @@ -67,11 +62,21 @@ class BladesDirector { return $(this.overlayElement).find(".overlay-section-transitions")[0]; } get svgData() { return SVGDATA; } - async renderOverlay() { + get sceneKeys() { return game.eunoblades.ClockKeeper.getSceneKeys(); } + renderOverlay_SocketCall() { + if (!game.user.isGM) { + return; + } + if (!this.overlayElement) { + return; + } + socketlib.system.executeForEveryone("renderOverlay_SocketCall"); + } + async renderOverlay_SocketResponse() { // Render the overlay element this.overlayElement.innerHTML = await renderTemplate("systems/eunos-blades/templates/overlay/blades-overlay.hbs", this); // Clear previously-applied listeners - $(this.overlayElement).find("*").addBack().off(".blades-director"); + $(this.overlayElement).find("*").addBack().off(); // Reactivate event listeners this.activateClockListeners(); this.activateScorePanelListeners(); @@ -81,8 +86,80 @@ class BladesDirector { this.activateCohortListeners(); this.activateCrewListeners(); } - activateClockListeners() { - // tbd... + async activateClockListeners() { + const clockKeySection$ = $(this.clockKeySectionElem); + clockKeySection$.find(".clock-key-container").each((_, keyContainer) => { + const keyContainer$ = $(keyContainer); + const clockKey = game.eunoblades.ClockKeys.get(keyContainer$.find(".clock-key").attr("id") ?? ""); + if (!clockKey) { + return; + } + // Enable pointer events on the container, so that the hover-over timeline can be played + keyContainer$.css("pointer-events", "auto"); + // Do the same for clocks contained by the key + clockKey.clocks.forEach((clock) => { + if (!clock.elem) { + return; + } + $(clock.elem).css("pointer-events", "auto"); + }); + if (game.user.isGM) { + // === GM-ONLY LISTENERS === + // Double-Click a Clock Key = SocketPull it, Open ClockKeeper sheet + keyContainer$.on("dblclick", async () => { + clockKey.pull_SocketCall(); + game.eunoblades.ClockKeeper.render(true); + }); + // Mouse-Wheel a Clock = Add/Remove Segments one-by-one. + // -- can UPDATE the server data immediately + // -- at end of each animated segment, check server data to see if another one should be animated in + // -- need animations for COMPLETING a clock, and for EMPTYING a clock. + clockKey.clocks.forEach((clock) => { + if (!clock.elem) { + return; + } + const clockElem$ = $(clock.elem); + clockElem$.on("wheel", async (event) => { + if (!(event.originalEvent instanceof WheelEvent)) { + return; + } + event.preventDefault(); + const delta = event.originalEvent.deltaY ?? 0; + if (delta > 0) { + await clock.fillSegments(1); + } + else if (delta < 0) { + await clock.clearSegments(1); + } + // === TEMPORARY: RERENDER DIRECTOR OVERLAY TO SEE CLOCK CHANGES === + // (replace with socketlib call to animation effect within fillSegments/clearSegments methods) + this.renderOverlay_SocketCall(); + }); + }); + } + else { + // === PLAYER-ONLY LISTENERS === + // Add listeners to container for mouseenter and mouseleave, that play and reverse timeline attached to element + keyContainer$.on("mouseenter", () => { + clockKey.hoverOverTimeline?.play(); + }).on("mouseleave", () => { + clockKey.hoverOverTimeline?.reverse(); + }); + // Now repeat this for each clock in the clock key + clockKey.clocks.forEach((clock) => { + if (!clock.elem) { + return; + } + const clockElem$ = $(clock.elem); + // Add listeners to clock for mouseenter and mouseleave, that play and reverse timeline attached to element + clockElem$.on("mouseenter", () => { + clock.hoverOverTimeline?.play(); + }).on("mouseleave", () => { + clock.hoverOverTimeline?.reverse(); + }); + }); + } + }); } activateScorePanelListeners() { // tbd... @@ -106,6 +183,7 @@ class BladesDirector { // #region SOCKETS static InitSockets() { const director = BladesDirector.getInstance(); + socketlib.system.register("renderOverlay_SocketCall", director.renderOverlay_SocketResponse.bind(director)); director.initClockSockets(); director.initScorePanelSockets(); director.initLocationSockets(); diff --git a/module/classes/BladesTargetLink.js b/module/classes/BladesTargetLink.js index 5c5bc664..830b0644 100644 --- a/module/classes/BladesTargetLink.js +++ b/module/classes/BladesTargetLink.js @@ -87,6 +87,7 @@ class BladesTargetLink { return new this(data); } // #endregion + // #region GETTERS ~ get isGM() { return game.user.isGM; } _id; _targetID; @@ -100,6 +101,22 @@ class BladesTargetLink { get target() { return this._target; } + get linkData() { + let linkData; + if (this.targetFlagKey) { + linkData = this.target.getFlag("eunos-blades", `${this.targetFlagKey}.${this.id}`) ?? undefined; + } + else if (this.targetKey) { + linkData = getProperty(this.target, `${this.targetKey}.${this.id}`); + } + if (!linkData) { + throw new Error("[BladesTargetLink.linkData] Error retrieving linkData."); + } + return linkData; + } + get data() { return this.linkData; } + // #endregion + // #region CONSTRUCTOR ~ constructor(data) { const { id, targetID, targetKey, targetFlagKey } = data; if (!id || !targetID || !(targetKey || targetFlagKey)) { @@ -120,23 +137,8 @@ class BladesTargetLink { } this._target = target; } - get linkData() { - let linkData; - if (this.targetFlagKey) { - linkData = this.target.getFlag("eunos-blades", `${this.targetFlagKey}.${this.id}`) ?? undefined; - } - else if (this.targetKey) { - linkData = getProperty(this.target, `${this.targetKey}.${this.id}`); - } - if (!linkData) { - throw new Error("[BladesTargetLink.linkData] Error retrieving linkData."); - } - return linkData; - } - get data() { return this.linkData; } - getTargetProp(prop) { - return this.linkData[prop]; - } + // #endregion + // #region ASYNC UPDATE & DELETE METHODS ~ async updateTarget(prop, val) { if (this.targetFlagKey) { this.target.setFlag("eunos-blades", `${this.targetFlagKey}.${this.id}.${prop}`, val); diff --git a/module/core/gsap.js b/module/core/gsap.js index 6f16d7d8..f2e955f9 100644 --- a/module/core/gsap.js +++ b/module/core/gsap.js @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import U from "./utilities.js"; import C from "./constants.js"; +import BladesClockKey, { BladesClock } from "../classes/BladesClocks.js"; // eslint-disable-next-line import/no-unresolved import { TextPlugin, Flip, Draggable as Dragger, MotionPathPlugin, SplitText, Observer, CustomEase, CustomWiggle, CustomBounce, EasePack } from "/scripts/greensock/esm/all.js"; const gsapPlugins = [ @@ -128,6 +129,58 @@ export const gsapEffects = { duration: 1 } }, + hoverOverClockKey: { + effect: (clockKey, config) => { + if (!(clockKey instanceof BladesClockKey)) { + throw new Error("clockKey is not an instance of BladesClockKey"); + } + if (!clockKey.elem) { + throw new Error("clockKey.elem is null or undefined"); + } + return U.gsap.timeline({ paused: true }) + .to(clockKey.elem, { + scale: 1.25, + ease: "sine", + duration: 0.25, + onStart() { + clockKey.keySwingTimeline?.tweenTo(1, { duration: 0.25, ease: "none" }); + }, + onReverse() { + clockKey.keySwingTimeline?.resume(); + } + }, 0); + }, + defaults: {} + }, + hoverOverClock: { + effect: (clock, config) => { + if (!(clock instanceof BladesClock)) { + throw new Error("clock is not an instance of BladesClock"); + } + if (!clock.elem) { + throw new Error("clock.elem is null or undefined"); + } + const [clockLabel] = $(clock.elem).find(".clock-label"); + const [clockGlow] = $(clock.elem).find(".clock-glow"); + return U.gsap.timeline({ paused: true }) + .fromTo(clock.elem, { filter: "brightness(1)" }, { + filter: "brightness(1.5)", + scale: 1.25, + duration: 0.25 + }) + .to(clockLabel, { + autoAlpha: 1, + duration: 0.25 + }, 0) + .to(clockGlow, { + autoAlpha: 1, + duration: 0.25 + }, 0); + }, + defaults: { + duration: 0.5 + } + }, csqEnter: { effect: (csqContainer, config) => { const csqRoot = U.gsap.utils.selector(csqContainer); diff --git a/module/core/helpers.js b/module/core/helpers.js index 3c8abeeb..42402081 100644 --- a/module/core/helpers.js +++ b/module/core/helpers.js @@ -30,9 +30,7 @@ export async function preloadHandlebarsTemplates() { "systems/eunos-blades/templates/parts/roll-opposition-creator.hbs", "systems/eunos-blades/templates/parts/active-effects.hbs", "systems/eunos-blades/templates/parts/gm-pc-summary.hbs", - // Overlays - "systems/eunos-blades/templates/overlays/clock-overlay.hbs", - "systems/eunos-blades/templates/overlays/clock-key.hbs" + "systems/eunos-blades/templates/components/clock-key.hbs" ]; // Load the template parts return loadTemplates(templatePaths); diff --git a/module/documents/actors/BladesFaction.js b/module/documents/actors/BladesFaction.js index 6d4afa5b..86230265 100644 --- a/module/documents/actors/BladesFaction.js +++ b/module/documents/actors/BladesFaction.js @@ -1,6 +1,11 @@ +import { BladesActorType } from "../../core/constants.js"; import { BladesActor } from "../BladesActorProxy.js"; import BladesClockKey from "../../classes/BladesClocks.js"; class BladesFaction extends BladesActor { + static get All() { + return new Collection(super.GetTypeWithTags(BladesActorType.faction) + .map((faction) => [faction.id, faction])); + } // #region BladesRoll Implementation // #region BladesRoll.OppositionDoc Implementation get rollOppID() { return this.id; } diff --git a/module/documents/actors/BladesPC.js b/module/documents/actors/BladesPC.js index 35e0406e..4e3ac8be 100644 --- a/module/documents/actors/BladesPC.js +++ b/module/documents/actors/BladesPC.js @@ -6,7 +6,7 @@ import BladesClockKey from "../../classes/BladesClocks.js"; import BladesDirector from "../../classes/BladesDirector.js"; import { SelectionCategory } from "../../classes/BladesDialog.js"; class BladesPC extends BladesActor { - // #region Static Overrides: Create ~ + // #region Static Overrides: Create, get All ~ static IsType(doc) { return super.IsType(doc, BladesActorType.pc); } @@ -66,6 +66,10 @@ class BladesPC extends BladesActor { ]); return pc; } + static get All() { + return new Collection(super.GetTypeWithTags(BladesActorType.pc) + .map((pc) => [pc.id, pc])); + } // #endregion constructor(data) { super(data); @@ -282,6 +286,9 @@ class BladesPC extends BladesActor { } await this.update({ "system.stash.value": Math.min(this.system.stash.value + amount, this.system.stash.max) }); } + get projects() { + return this.getSubItemsOfType(BladesItemType.project); + } get remainingDowntimeActions() { if (!BladesActor.IsType(this, BladesActorType.pc)) { return 0; diff --git a/module/documents/items/BladesClockKeeper.js b/module/documents/items/BladesClockKeeper.js index a9b95c3d..7087a25e 100644 --- a/module/documents/items/BladesClockKeeper.js +++ b/module/documents/items/BladesClockKeeper.js @@ -1,8 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import U from "../../core/utilities.js"; -import { SVGDATA, BladesItemType } from "../../core/constants.js"; import { BladesItem } from "../BladesItemProxy.js"; -import BladesClockKey, { ApplyClockListeners } from "../../classes/BladesClocks.js"; +import BladesClockKey from "../../classes/BladesClocks.js"; class BladesClockKeeper extends BladesItem { static async Initialize() { const clockKeeper = game.items.find((item) => item.type === "clock_keeper"); @@ -16,71 +15,26 @@ class BladesClockKeeper extends BladesItem { else { game.eunoblades.ClockKeeper = clockKeeper; } - game.eunoblades.ClockKeeper.renderOverlay(); + return loadTemplates([ + "systems/eunos-blades/templates/parts/clock-sheet-key-controls-full.hbs", + "systems/eunos-blades/templates/parts/clock-sheet-key-controls-minimal.hbs", + "systems/eunos-blades/templates/parts/clock-sheet-clock-controls-full.hbs", + "systems/eunos-blades/templates/parts/clock-sheet-clock-controls-minimal.hbs" + ]); } - static InitSockets() { - socketlib.system.register("renderOverlay", game.eunoblades.ClockKeeper.renderOverlay); - } - // #region CLOCKS OVERLAY - _overlayElement; - get overlayElement() { - this._overlayElement ??= $("#clocks-overlay")[0]; - if (!this._overlayElement) { - $("body.vtt.game.system-eunos-blades").append(""); - [this._overlayElement] = $("#clocks-overlay"); + showClockKeyControls(keyID) { + if (this.sheet?.element) { + // Find the key controls row, flip it over to controls row. } - return this._overlayElement; } - async renderOverlay() { - if (!game.scenes?.current) { - return; + hideClockKeyControls(keyID) { + if (this.sheet?.element) { + // Find the key controls row, flip it back to minimal summary } - const { ClockKeeper: keeper } = game.eunoblades; - if (!keeper) { - return; - } - const { overlayElement } = keeper; - eLog.checkLog3("clocksOverlay", "[ClocksOverlay] RenderOverlay", overlayElement); - if (!overlayElement) { - eLog.error("clocksOverlay", "[ClocksOverlay] Cannot locate overlay element."); - return; - } - // Re-render the overlay element - overlayElement.innerHTML = await renderTemplate("systems/eunos-blades/templates/overlays/clock-overlay.hbs", keeper); - // Reactivate event listeners - keeper.activateOverlayListeners(); } + // #region CLOCKS OVERLAY get clockKeys() { return this.getSceneKeys(); } get currentScene() { return game.scenes?.current?.id; } - get svgData() { return SVGDATA; } - async activateOverlayListeners() { - if (!game?.user?.isGM) { - return; - } - eLog.checkLog3("clocksOverlay", "[activateOverlayListeners] Keys", this.keys); - ApplyClockListeners($("#clocks-overlay"), "ClocksOverlay"); - $("#clocks-overlay").find(".key-label").on({ - click: async (event) => { - if (!event.currentTarget) { - return; - } - if (!BladesItem.IsType(game.eunoblades.ClockKeeper, BladesItemType.clock_keeper)) { - return; - } - event.preventDefault(); - const clockKey = game.eunoblades.ClockKeys.get($(event.currentTarget).data("keyId")); - if (clockKey && clockKey.elem) { - await clockKey.toggleActive(); - } - }, - contextmenu: () => { - if (!game.user.isGM) { - return; - } - game.eunoblades.ClockKeeper?.sheet?.render(true); - } - }); - } get currentSceneID() { if (!game.scenes?.current) { throw new Error("[BladesClockKeeper.currentScene] Error retrieving 'game.scenes.current'."); diff --git a/module/documents/items/BladesProject.js b/module/documents/items/BladesProject.js index 188b5de2..4a4a3648 100644 --- a/module/documents/items/BladesProject.js +++ b/module/documents/items/BladesProject.js @@ -19,6 +19,12 @@ class BladesProject extends BladesItem { this._clockKey = game.eunoblades.ClockKeys.get(Object.keys(this.system.clocksData)[0]); return this._clockKey; } + get ownerName() { + if (this.parent) { + return this.parent.name; + } + return undefined; + } get currentClock() { return this.clockKey?.currentClock; } diff --git a/module/sheets/item/BladesClockKeeperSheet.js b/module/sheets/item/BladesClockKeeperSheet.js index a8578a10..14517e39 100644 --- a/module/sheets/item/BladesClockKeeperSheet.js +++ b/module/sheets/item/BladesClockKeeperSheet.js @@ -1,4 +1,5 @@ import BladesItemSheet from "./BladesItemSheet.js"; +import { BladesPC, BladesFaction } from "../../documents/BladesActorProxy.js"; class BladesClockKeeperSheet extends BladesItemSheet { // static Get() { return game.eunoblades.ClockKeeper as BladesClockKeeper; } static get defaultOptions() { @@ -6,21 +7,23 @@ class BladesClockKeeperSheet extends BladesItemSheet { classes: ["eunos-blades", "sheet", "item", "clock-keeper"], template: "systems/eunos-blades/templates/items/clock_keeper-sheet.hbs", width: 700, - height: 970 + height: 970, + tabs: [{ navSelector: ".nav-tabs", contentSelector: ".tab-content", initial: "scene-keys" }] }); } static async Initialize() { Items.registerSheet("blades", BladesClockKeeperSheet, { types: ["clock_keeper"], makeDefault: true }); return loadTemplates([ - "systems/eunos-blades/templates/items/clock_keeper-sheet.hbs", - "systems/eunos-blades/templates/parts/clock-sheet-row.hbs" + "systems/eunos-blades/templates/items/clock_keeper-sheet.hbs" ]); } getData() { const context = super.getData(); const sheetData = { sceneOptions: Array.from(game.scenes), - sceneKeys: this.item.getSceneKeys(this.item.system.targetScene ?? game.scenes.current.id) + sceneKeys: this.item.getSceneKeys(this.item.system.targetScene ?? game.scenes.current.id), + pcsWithProjects: BladesPC.All.filter((pc) => pc.projects.length > 0), + factions: Array.from(BladesFaction.All) }; return { ...context, ...sheetData }; } diff --git a/scss/components/_clocks-overlay.scss b/scss/components/_clocks-overlay.scss index e652d7e0..82dde428 100644 --- a/scss/components/_clocks-overlay.scss +++ b/scss/components/_clocks-overlay.scss @@ -1,82 +1,4 @@ -$key-sizes: ( - 1: (height: 455px, width: 202px, labelTop: 150px, inactiveKeyTop: -350px, inactiveLabelLeft: -40px, inactiveLabelBottom: 50px), - 2: (height: 624.438px, width: 202px, labelTop: 400px, inactiveKeyTop: -520px, inactiveLabelLeft: -40px, inactiveLabelBottom: 50px), - 3: (height: 915px, width: 280px, labelTop: 600px, inactiveKeyTop: -815px, inactiveLabelLeft: -10px, inactiveLabelBottom: 50px), - 4: (height: 1140px, width: 376px, labelTop: 700px, inactiveKeyTop: -925px, inactiveLabelLeft: 40px, inactiveLabelBottom: 150px), - 5: (height: 1140px, width: 376px, labelTop: 800px, inactiveKeyTop: -1025px, inactiveLabelLeft: 40px, inactiveLabelBottom: 50px), - 6: (height: 1150px, width: 376px, labelTop: 900px, inactiveKeyTop: -1025px, inactiveLabelLeft: 40px, inactiveLabelBottom: 50px) -); -$clock-positions: ( - 1: ( - 1: (x: 101px, y: 99px) - ), - 2: ( - 1: (x: 101px, y: 99px), - 2: (x: 101px, y: 279px) - ), - 3: ( - 1: (x: 140px, y: 99px), - 2: (x: 74px, y: 211px), - 3: (x: 206px, y: 211px) - ), - 4: ( - 1: (x: 188px, y: 99px), - 2: (x: 101px, y: 185px), - 3: (x: 275px, y: 185px), - 4: (x: 188px, y: 273px) - ), - 5: ( - 1: (x: 188px, y: 99px), - 2: (x: 101px, y: 185px), - 3: (x: 275px, y: 185px), - 4: (x: 188px, y: 273px), - 5: (x: 188px, y: 452px) - ), - 6: ( - 1: (x: 188px, y: 99px), - 2: (x: 101px, y: 185px), - 3: (x: 275px, y: 185px), - 4: (x: 188px, y: 273px), - 5: (x: 188px, y: 452px), - 6: (x: 188px, y: 683px) - ) -); - -$label-positions: ( - 1: ( - 1: (x: 0, y: 0px, align: center, width: 100%), - ), - 2: ( - 1: (x: 0, y: 0px, align: center, width: 100%), - 2: (x: 0, y: 325px, align: center, width: 100%), - ), - 3: ( - 1: (x: 0, y: 0px, align: center, width: 100%), - 2: (x: -20px, y: 110px, align: right, width: 50%), - 3: (x: 220px, y: 265px, align: left, width: 50%), - ), - 4: ( - 1: (x: 0, y: 0px, align: center, width: 100%), - 2: (x: -60px, y: 80px, align: right, width: 50%), - 3: (x: 340px, y: 230px, align: left, width: 50%), - 4: (x: 0, y: 320px, align: center, width: 100%) - ), - 5: ( - 1: (x: 0, y: 0px, align: center, width: 100%), - 2: (x: -60px, y: 80px, align: right, width: 50%), - 3: (x: 340px, y: 230px, align: left, width: 50%), - 4: (x: 0, y: 320px, align: center, width: 100%), - 5: (x: 0, y: 500px, align: center, width: 100%), - ), - 6: ( - 1: (x: 0, y: 0px, align: center, width: 100%), - 2: (x: -60px, y: 80px, align: right, width: 50%), - 3: (x: 340px, y: 230px, align: left, width: 50%), - 4: (x: 0, y: 320px, align: center, width: 100%), - 5: (x: 0, y: 500px, align: center, width: 100%), - 6: (x: 0, y: 730px, align: center, width: 100%), - ) -); + & { diff --git a/scss/overlay/_blades-overlay.scss b/scss/overlay/_blades-overlay.scss index 85672a92..bd0a8cc2 100644 --- a/scss/overlay/_blades-overlay.scss +++ b/scss/overlay/_blades-overlay.scss @@ -1,22 +1,39 @@ -&, .overlay-section { - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; - pointer-events: none; - z-index: 50; - perspective: 500px; - transform-style: preserve-3d; - - #testSquare { +$key-sizes: ( + 1: (height: 455px, width: 202px, labelTop: 150px, inactiveKeyTop: -350px, inactiveLabelLeft: -40px, inactiveLabelBottom: 50px), + 2: (height: 624.438px, width: 202px, labelTop: 400px, inactiveKeyTop: -520px, inactiveLabelLeft: -40px, inactiveLabelBottom: 50px), + 3: (height: 915px, width: 280px, labelTop: 600px, inactiveKeyTop: -815px, inactiveLabelLeft: -10px, inactiveLabelBottom: 50px), + 4: (height: 1140px, width: 376px, labelTop: 700px, inactiveKeyTop: -925px, inactiveLabelLeft: 40px, inactiveLabelBottom: 150px), + 5: (height: 1140px, width: 376px, labelTop: 800px, inactiveKeyTop: -1025px, inactiveLabelLeft: 40px, inactiveLabelBottom: 50px), + 6: (height: 1150px, width: 376px, labelTop: 900px, inactiveKeyTop: -1025px, inactiveLabelLeft: 40px, inactiveLabelBottom: 50px) +); + +& { + &, & > * { + display: block; position: absolute; - top: 200px; - left: 300px; - background: blue; - height: 200px; - width: 200px; + top: 0; + left: 0; + height: 100%; + width: 100%; + pointer-events: none; + z-index: 50; + perspective: 500px; + transform-style: preserve-3d; } + + @import "../components/clocks"; + +} + +&, +.overlay-section, +.svg-defs { + + + + + + .clock-key-container { visibility: hidden; } } \ No newline at end of file diff --git a/templates/actor-sheet.hbs b/templates/actor-sheet.hbs index 4817afe3..8541dddf 100644 --- a/templates/actor-sheet.hbs +++ b/templates/actor-sheet.hbs @@ -220,7 +220,7 @@
State | -Name | -Size | -- {{> "systems/eunos-blades/templates/components/button-icon.hbs" - buttonClass="fa-sharp fa-solid fa-square-plus" - tooltip="Add Key" - action="add-key" - }} - | - - - {{#each sceneKeys as |key keyID|}} - - {{> "systems/eunos-blades/parts/clock-sheet-key.hbs" }} +
---|