diff --git a/css/style.min.css b/css/style.min.css index 1feccdb4..b983c962 100644 --- a/css/style.min.css +++ b/css/style.min.css @@ -6459,6 +6459,90 @@ template { perspective: 500px; transform-style: preserve-3d; } +: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) .clock-label { + left: 0; + top: 0px; +} +: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) .clock-label { + left: 0%; + top: 90%; +} +: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) .clock-label { + left: 100%; + top: -15%; +} +: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) .clock-label { + left: 0; + 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(2) .clock-label { + left: -20px; + top: 110px; +} +: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) .clock-label { + left: 220px; + top: 265px; +} +: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) .clock-label { + left: 0; + top: 0px; +} +: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) .clock-label { + left: -60px; + top: 80px; +} +: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) .clock-label { + left: 340px; + top: 230px; +} +: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) .clock-label { + left: 0; + top: 320px; +} +: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) .clock-label { + left: 0; + 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(2) .clock-label { + left: -60px; + top: 80px; +} +: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) .clock-label { + left: 340px; + top: 230px; +} +: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) .clock-label { + left: 0; + top: 320px; +} +: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) .clock-label { + left: 0; + top: 500px; +} +: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) .clock-label { + left: 0; + top: 0px; +} +: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) .clock-label { + left: -60px; + top: 80px; +} +: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) .clock-label { + left: 340px; + top: 230px; +} +: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) .clock-label { + left: 0; + top: 320px; +} +: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) .clock-label { + left: 0; + top: 500px; +} +: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) .clock-label { + left: 0; + top: 730px; +} :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="1"] { --key-height: 836px; --key-width: 230px; @@ -6473,15 +6557,15 @@ template { --key-height: 625.438px; --key-width: 197.009px; --clock-size: 108px; - --label-top: 100px; + --label-top: 150px; } :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: 98.579px; - top: 280px; + 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(2) { left: 98.579px; - top: 100px; + top: 280px; } :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container[data-size="3"] { --key-height: 915.936px; @@ -6593,18 +6677,19 @@ template { } :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-label { font-family: var(--font-emphasis); - font-size: 3rem; + font-size: 48px; + line-height: 48px; font-weight: bold; text-transform: uppercase; + text-align: center; letter-spacing: 1px; top: var(--label-top); z-index: 20; - width: 200%; - pointer-events: all; + width: max-content; 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); - white-space: nowrap; - left: -50%; + text-shadow: 0 0 10px var(--blades-black-dark), 0 0 10px var(--blades-black-dark); + white-space: balance; + left: 50%; position: absolute; } :root body.vtt.game.system-eunos-blades #blades-overlay .clock-key-container .clock-key .key-image-container { @@ -6660,17 +6745,16 @@ template { } :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-label { position: absolute; - transform: translate(-50%, -50%); - top: 50%; - left: 50%; + transform: translate(-50%, 0%); 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; + width: max-content; + height: auto; } :root body.vtt.game.system-eunos-blades #blades-overlay .clock-container .clock .clock-frame { z-index: 3; @@ -9646,6 +9730,90 @@ template { perspective: 500px; transform-style: preserve-3d; } +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="1"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0%; + top: 90%; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: 100%; + top: -15%; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -20px; + top: 110px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 220px; + top: 265px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(5) .clock-label { + left: 0; + top: 500px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(5) .clock-label { + left: 0; + top: 500px; +} +:root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(6) .clock-label { + left: 0; + top: 730px; +} :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="1"] { --key-height: 836px; --key-width: 230px; @@ -9660,15 +9828,15 @@ template { --key-height: 625.438px; --key-width: 197.009px; --clock-size: 108px; - --label-top: 100px; + --label-top: 150px; } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) { left: 98.579px; - top: 280px; + top: 100px; } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) { left: 98.579px; - top: 100px; + top: 280px; } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container[data-size="3"] { --key-height: 915.936px; @@ -9780,18 +9948,19 @@ template { } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container .clock-key .key-label { font-family: var(--font-emphasis); - font-size: 3rem; + font-size: 48px; + line-height: 48px; font-weight: bold; text-transform: uppercase; + text-align: center; letter-spacing: 1px; top: var(--label-top); z-index: 20; - width: 200%; - pointer-events: all; + width: max-content; 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); - white-space: nowrap; - left: -50%; + text-shadow: 0 0 10px var(--blades-black-dark), 0 0 10px var(--blades-black-dark); + white-space: balance; + left: 50%; position: absolute; } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-key-container .clock-key .key-image-container { @@ -9847,17 +10016,16 @@ template { } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-container .clock .clock-label { position: absolute; - transform: translate(-50%, -50%); - top: 50%; - left: 50%; + transform: translate(-50%, 0%); 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; + width: max-content; + height: auto; } :root body.vtt.game.system-eunos-blades #clocks-overlay .clock-container .clock .clock-frame { z-index: 3; @@ -23322,6 +23490,90 @@ template { perspective: 500px; transform-style: preserve-3d; } +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="1"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0%; + top: 90%; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: 100%; + top: -15%; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -20px; + top: 110px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 220px; + top: 265px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(5) .clock-label { + left: 0; + top: 500px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(5) .clock-label { + left: 0; + top: 500px; +} +:root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(6) .clock-label { + left: 0; + top: 730px; +} :root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="1"] { --key-height: 836px; --key-width: 230px; @@ -23336,15 +23588,15 @@ template { --key-height: 625.438px; --key-width: 197.009px; --clock-size: 108px; - --label-top: 100px; + --label-top: 150px; } :root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) { left: 98.579px; - top: 280px; + top: 100px; } :root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) { left: 98.579px; - top: 100px; + top: 280px; } :root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container[data-size="3"] { --key-height: 915.936px; @@ -23456,18 +23708,19 @@ template { } :root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container .clock-key .key-label { font-family: var(--font-emphasis); - font-size: 3rem; + font-size: 48px; + line-height: 48px; font-weight: bold; text-transform: uppercase; + text-align: center; letter-spacing: 1px; top: var(--label-top); z-index: 20; - width: 200%; - pointer-events: all; + width: max-content; 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); - white-space: nowrap; - left: -50%; + text-shadow: 0 0 10px var(--blades-black-dark), 0 0 10px var(--blades-black-dark); + white-space: balance; + left: 50%; position: absolute; } :root body.vtt.game.system-eunos-blades .app.window-app .clock-key-container .clock-key .key-image-container { @@ -23523,17 +23776,16 @@ template { } :root body.vtt.game.system-eunos-blades .app.window-app .clock-container .clock .clock-label { position: absolute; - transform: translate(-50%, -50%); - top: 50%; - left: 50%; + transform: translate(-50%, 0%); 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; + width: max-content; + height: auto; } :root body.vtt.game.system-eunos-blades .app.window-app .clock-container .clock .clock-frame { z-index: 3; @@ -25199,6 +25451,90 @@ template { perspective: 500px; transform-style: preserve-3d; } +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="1"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0%; + top: 90%; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: 100%; + top: -15%; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -20px; + top: 110px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="3"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 220px; + top: 265px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="4"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="5"] .clock-key .key-image-container .clock-container:nth-of-type(5) .clock-label { + left: 0; + top: 500px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(1) .clock-label { + left: 0; + top: 0px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(2) .clock-label { + left: -60px; + top: 80px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(3) .clock-label { + left: 340px; + top: 230px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(4) .clock-label { + left: 0; + top: 320px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(5) .clock-label { + left: 0; + top: 500px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="6"] .clock-key .key-image-container .clock-container:nth-of-type(6) .clock-label { + left: 0; + top: 730px; +} :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="1"] { --key-height: 836px; --key-width: 230px; @@ -25213,15 +25549,15 @@ template { --key-height: 625.438px; --key-width: 197.009px; --clock-size: 108px; - --label-top: 100px; + --label-top: 150px; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(1) { left: 98.579px; - top: 280px; + top: 100px; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="2"] .clock-key .key-image-container .clock-container:nth-of-type(2) { left: 98.579px; - top: 100px; + top: 280px; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container[data-size="3"] { --key-height: 915.936px; @@ -25333,18 +25669,19 @@ template { } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container .clock-key .key-label { font-family: var(--font-emphasis); - font-size: 3rem; + font-size: 48px; + line-height: 48px; font-weight: bold; text-transform: uppercase; + text-align: center; letter-spacing: 1px; top: var(--label-top); z-index: 20; - width: 200%; - pointer-events: all; + width: max-content; 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); - white-space: nowrap; - left: -50%; + text-shadow: 0 0 10px var(--blades-black-dark), 0 0 10px var(--blades-black-dark); + white-space: balance; + left: 50%; position: absolute; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-key-container .clock-key .key-image-container { @@ -25400,17 +25737,16 @@ template { } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-container .clock .clock-label { position: absolute; - transform: translate(-50%, -50%); - top: 50%; - left: 50%; + transform: translate(-50%, 0%); 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; + width: max-content; + height: auto; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet .window-content .clock-key-container .clock-container .clock .clock-frame { z-index: 3; @@ -26843,27 +27179,41 @@ template { :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content { max-height: 100%; } +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form { + --icon-size: 25px; +} :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon { position: relative; - width: auto; - height: auto; + width: var(--icon-size); + height: var(--icon-size); line-height: unset; - margin: 0 5px; + margin: 0 calc(var(--icon-size) / 8); + text-shadow: 0px 0px 3px var(--blades-black-dark), 0px 0px 3px var(--blades-black-dark); +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon.clock-control-delete-key, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon.clock-control-delete-key { + min-width: 20px; + color: var(--blades-red); + text-align: center; + margin-left: 6px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon.clock-control-pull-key, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon.clock-control-pull-key { + text-shadow: none; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon i, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon i { margin: 0; width: auto; height: auto; line-height: unset; - font-size: 20px; - opacity: 1; -} -:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon i.fa-duotone, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon i.fa-duotone { - transition: 0.25s; + font-size: calc(var(--icon-size) * 0.8); + transition: 0.05s; transform-origin: 50% 50%; pointer-events: auto; + opacity: 1; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon i[class*=slash], :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon i[class*=slash] { + opacity: 0.5; } -:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon i.fa-duotone:hover, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon i.fa-duotone:hover { +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .button-icon i:hover, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .toggle-icon i:hover { scale: 1.1; filter: brightness(1.5) saturate(1.5); } @@ -26903,13 +27253,14 @@ template { line-height: 30px; width: 100%; padding: 0px; - border-radius: 5px; display: flex; align-items: center; justify-content: stretch; - background: linear-gradient(45deg, var(--blades-grey-bright), var(--blades-grey-dark)); - font-size: 24px; - box-shadow: inset 0 0 2px 2px var(--blades-black-dark); +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper .clock-key-input-name, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper .clock-key-input-name { + font-family: var(--font-emphasis-narrow); + padding-bottom: 3px; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper > div, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper > div { @@ -26921,6 +27272,10 @@ template { flex-direction: row; justify-content: space-between; align-items: center; + background: linear-gradient(45deg, var(--blades-grey-bright), var(--blades-grey-dark)); + font-size: 24px; + box-shadow: inset 0 0 2px 2px var(--blades-black-dark); + color: var(--blades-white-bright); height: 30px; line-height: 30px; width: 100%; @@ -26932,24 +27287,70 @@ template { color: var(--blades-black); background: linear-gradient(45deg, var(--blades-white-bright), var(--blades-grey-bright)); } -:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper > div .button-icon i[class*=slash], -:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper > div .button-icon i[class*=slash] { - opacity: 0.5; +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper > div.controls-back .button-icon, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper > div.controls-back .toggle-icon, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper > div.controls-back .button-icon, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper > div.controls-back .toggle-icon { + text-shadow: none; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper .clock-control-segment-buttons, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper .clock-control-segment-buttons { + height: 100%; + display: flex; + align-items: center; + margin: 0 5px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper .clock-control-segment-buttons .button-icon, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper .clock-control-segment-buttons .button-icon { + margin: 0; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper { height: 20px; line-height: 20px; font-size: 16px; + background: transparent; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div { height: 20px; line-height: 20px; + margin-left: 40px; + width: calc(100% - 40px); } -:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div .button-icon i, -:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div .button-icon i { - font-size: 12px; +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div input[type=text], +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div select.clock-control-select, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div input[type=text], +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div select.clock-control-select { + height: 20px; + line-height: 20px; + font-size: 14px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div select.clock-control-select, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div select.clock-control-select { + text-indent: 0; + min-width: 40px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + text-align: center; + font-weight: bold; + font-family: var(--font-emphasis); + margin: 0 5px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div select.clock-control-select option, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div select.clock-control-select option { + text-align: center; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div .button-icon, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div .toggle-icon, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div .button-icon, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div .toggle-icon { + --icon-size: 15px; +} +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div .button-icon.clock-control-delete-clock, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper.clock-control-flipper > div .toggle-icon.clock-control-delete-clock, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div .button-icon.clock-control-delete-clock, +:root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper.clock-control-flipper > div .toggle-icon.clock-control-delete-clock { + color: var(--blades-red); + min-width: 20px; } :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-key-control-flipper .clock-key-control-flipper + .clock-control-flipper .clock-control-panel .clock-control-delete-clock, :root body.vtt.game.system-eunos-blades .app.window-app.sheet.item.clock-keeper .window-content form .sheet-root .tab-content .tab .clock-control-flipper .clock-key-control-flipper + .clock-control-flipper .clock-control-panel .clock-control-delete-clock { diff --git a/module/classes/BladesClocks.js b/module/classes/BladesClocks.js index 75c6e0f1..51c87c88 100644 --- a/module/classes/BladesClocks.js +++ b/module/classes/BladesClocks.js @@ -264,7 +264,7 @@ class BladesClockKey extends BladesTargetLink { const clockKeyHTML = await renderTemplate("systems/eunos-blades/templates/components/clock-key.hbs", this); $(clockKeyHTML).appendTo(containerElem$); this.removePositionDragger(); - this.initClockKeyElem(); + this.initClockKeyElem(ClockKeyDisplayMode.full); this.activateClockListeners(); this.initOverlayElement(callback); } @@ -332,7 +332,7 @@ class BladesClockKey extends BladesTargetLink { } return this.svgData.clocks[clockIndex]; } - initClockKeyElem() { + initClockKeyElem(displayModeOverride) { if (!this.containerElem$) { throw new Error(`[BladesClockKey.initClockKeyElem] Error containerElem$ not found for key '${this.id}'.`); } @@ -346,7 +346,11 @@ class BladesClockKey extends BladesTargetLink { top: this.overlayPosition.y }); } - const { keyTweenVars, keyContTweenVars } = this.getVarsForDisplayMode(this.displayMode); + // If the key has a name, apply adjustments to the label container for a pleasing aspect ratio + if (this.name && this.labelElem$) { + U.adjustTextContainerAspectRatio(this.labelElem$, 2, 100); + } + const { keyTweenVars, keyContTweenVars } = this.getVarsForDisplayMode(displayModeOverride ?? this.displayMode); const keyImgContainer = this.elem$.find(".key-image-container")[0]; if (!keyImgContainer) { throw new Error(`[BladesClockKey.initOverlayElement] Error keyImgContainer not found for key '${this.id}'.`); @@ -447,10 +451,10 @@ class BladesClockKey extends BladesTargetLink { } } else if (/^present/.exec(`${displayMode}`)) { - // Are we presenting? If so, get the presentingClock and reduce displayMode to the clock index. - displayMode = U.pInt(`${displayMode}`.replace("present", "")) - 1; + // Are we presenting? If so, get the presentingClock and the clock index. + displayMode = U.pInt(`${displayMode}`.replace("present", "")); if (displayMode < 0 || displayMode >= this.size) { - throw new Error(`[BladesClockKey.getVarsForDisplayMode] Error display mode 'present${displayMode + 1}' is not a valid clock index for key '${this.id}'.`); + throw new Error(`[BladesClockKey.getVarsForDisplayMode] Error display mode 'present${displayMode}' is not a valid clock index for key '${this.id}'.`); } presentingClock = this.getClockByIndex(displayMode); } @@ -567,7 +571,8 @@ class BladesClockKey extends BladesTargetLink { ignoreMargin: true, duration: 0.75 }) - .textJitter(this.labelElem$); + .to(this.labelElem$, { xPercent: -50, duration: 0.75 }, 0); + // .textJitter(this.labelElem$); } return this._nameFadeInTimeline; } @@ -895,13 +900,13 @@ class BladesClock extends BladesTargetLink { if (!this._nameFadeInTimeline) { this._nameFadeInTimeline = U.gsap.timeline({ callbackScope: this, - data: {}, - onComplete() { - this.nameFadeInTimeline.data.textJitterTimeline = U.gsap.effects.textJitter(this.labelElem$).play(); - }, - onReverseComplete() { - this.nameFadeInTimeline.data.textJitterTimeline.kill(); - } + data: {} + // onComplete() { + // this.nameFadeInTimeline.data.textJitterTimeline = U.gsap.effects.textJitter(this.labelElem$).play(); + // }, + // onReverseComplete() { + // this.nameFadeInTimeline.data.textJitterTimeline.kill(); + // } }).blurReveal(this.labelElem$, { ignoreMargin: true, duration: 0.75 @@ -994,6 +999,38 @@ class BladesClock extends BladesTargetLink { // clock.fadeOutClockName_SocketCall(); // clock.highlight_SocketCall(); // clock.unhighlight_SocketCall(); + changeSegments_Animation(delta, callback) { + const tl = U.gsap.timeline({ + callbackScope: this, + onComplete() { + callback?.(); + } + }); + return tl; + // const clockKey = game.eunoblades.ClockKeys.get("brMaMG9ogeEvvuXD"); + // const clock = Array.from(clockKey.clocks)[1]; + // const oneSegments = Array.from(clock.elem$.find(".clock-one-segment")); + // function getRotationAngle(clock, segment) { + // const stepSize = 360 / clock.max; + // return stepSize * (segment - 1); + // } + // function rotateOneSegment(clock, oneSegment, segmentNum) { + // const angle = getRotationAngle(clock, segmentNum); + // U.gsap.set(oneSegment, {rotation: angle}); + // } + // function addSegments(amount) { + // while (clock.value + amount > clock.max) { amount--; } + // const oneSegs = [...oneSegments].slice(0, amount); + // for (let i = 1; i <= amount; i++) { + // const thisSegment = clock.value + i; + // rotateOneSegment(clock, oneSegs[i-1], thisSegment); + // } + // U.gsap.fromTo(oneSegs, {scale: 1.5}, {scale: 1, autoAlpha: 1, duration: 1, stagger: 0.5, onComplete() { + // U.gsap.to(oneSegs, {autoAlpha: 0, duration: 1, delay: 2}); + // } + // }); + // } + } // clock.changeSegments_SocketCall(value) // #endregion // #region Adding/Removing Clock Segments ~ @@ -1023,8 +1060,9 @@ class BladesClock extends BladesTargetLink { return clockOverflow; } async delete() { + const { parentKey } = this; await super.delete(); - this.parentKey?.updateClockIndices(); + parentKey.updateClockIndices(); } } export default BladesClockKey; diff --git a/module/core/constants.js b/module/core/constants.js index 2700f718..44388270 100644 --- a/module/core/constants.js +++ b/module/core/constants.js @@ -406,12 +406,12 @@ export var ClockKeyDisplayMode; ClockKeyDisplayMode["full"] = "full"; ClockKeyDisplayMode["clocks"] = "clocks"; ClockKeyDisplayMode["activeClocks"] = "activeClocks"; + ClockKeyDisplayMode["present0"] = "present0"; ClockKeyDisplayMode["present1"] = "present1"; ClockKeyDisplayMode["present2"] = "present2"; ClockKeyDisplayMode["present3"] = "present3"; ClockKeyDisplayMode["present4"] = "present4"; ClockKeyDisplayMode["present5"] = "present5"; - ClockKeyDisplayMode["present6"] = "present6"; })(ClockKeyDisplayMode || (ClockKeyDisplayMode = {})); // #endregion // #region 'C' CONSTANTS DEFINITIONS ~ diff --git a/module/core/utilities.js b/module/core/utilities.js index 9a5b266a..4199e2bb 100644 --- a/module/core/utilities.js +++ b/module/core/utilities.js @@ -1410,6 +1410,45 @@ const changeContainer = (elem, container) => { $(elem).appendTo($(container)); gsap.set(elem, relPos); }; +const adjustTextContainerAspectRatio = (textContainer, targetRatio, maxHeight, maxWidth, minFontSize = 8) => { + textContainer = $(textContainer)[0]; + const style = window.getComputedStyle(textContainer); + const lineHeight = parseFloat(style.lineHeight); + const initialWidth = parseFloat(style.width); + let bestWidth = initialWidth; + for (let lines = 1;; lines++) { + const expectedHeight = lineHeight * lines; + const expectedWidth = initialWidth / lines; + const expectedRatio = expectedWidth / expectedHeight; + if (expectedRatio < targetRatio) { + break; + } + if (maxHeight && expectedHeight > maxHeight) { + // If a maximum height is provided and we've exceeded that, + // reduce the font size and line height by 80% and recursively return this function to try again + const newFontSize = parseFloat(style.fontSize) * 0.8; + const newLineHeight = parseFloat(style.lineHeight) * 0.8; + if (newFontSize <= minFontSize) { + break; + } + textContainer.style.fontSize = `${newFontSize}px`; + textContainer.style.lineHeight = `${newLineHeight}px`; + return adjustTextContainerAspectRatio(textContainer, targetRatio, maxHeight, maxWidth); + } + bestWidth = expectedWidth; + } + // If a maximum width is provided but we've exceeded that, + // reduce the font size and line height by 80% and recursively return this function to try again + if (maxWidth && bestWidth > maxWidth) { + const newFontSize = parseFloat(style.fontSize) * 0.8; + const newLineHeight = parseFloat(style.lineHeight) * 0.8; + textContainer.style.fontSize = `${newFontSize}px`; + textContainer.style.lineHeight = `${newLineHeight}px`; + return adjustTextContainerAspectRatio(textContainer, targetRatio, maxHeight, maxWidth); + } + // Apply the best width + textContainer.style.width = `${bestWidth}px`; +}; const getSvgCode = (svgDotKey, svgPathKeys) => { const svgData = getProperty(SVGDATA, svgDotKey); // eLog.checkLog3("compileSvg", {svgDotKey, svgPaths, svgData}); @@ -1810,7 +1849,7 @@ export default { getDynamicFunc, withLog, // ████████ HTML: Parsing HTML Code, Manipulating DOM Objects ████████ getSvgCode, - changeContainer, + changeContainer, adjustTextContainerAspectRatio, getRawCirclePath, drawCirclePath, getColorVals, getRGBString, getHEXString, getContrastingColor, getRandomColor, getSiblings, diff --git a/module/documents/items/BladesClockKeeper.js b/module/documents/items/BladesClockKeeper.js index b2bf1dea..ed187b79 100644 --- a/module/documents/items/BladesClockKeeper.js +++ b/module/documents/items/BladesClockKeeper.js @@ -47,7 +47,7 @@ class BladesClockKeeper extends BladesItem { } getSceneKeys(sceneID) { sceneID ??= this.targetSceneID; - return new Collection(this.keys + return new Collection(Array.from(game.eunoblades.ClockKeys) .filter((clockKey) => clockKey.sceneIDs.includes(sceneID)) .map((clockKey) => [clockKey.id, clockKey])); } diff --git a/module/sheets/item/BladesClockKeeperSheet.js b/module/sheets/item/BladesClockKeeperSheet.js index cc29b48b..cb69f9c0 100644 --- a/module/sheets/item/BladesClockKeeperSheet.js +++ b/module/sheets/item/BladesClockKeeperSheet.js @@ -42,6 +42,13 @@ class BladesClockKeeperSheet extends BladesItemSheet { } async activateListeners(html) { super.activateListeners(html); + html.find("[data-action=\"create-clock-key\"").on({ + click: async (event) => { + event.preventDefault(); + await this.item.addClockKey(); + // Notify GM + } + }); // #region Helper Functions to Retrieve Clock Keys & Clocks ~ function getClockKeyFromEvent(event) { const id = $(event.currentTarget).data("keyId") @@ -86,13 +93,6 @@ class BladesClockKeeperSheet extends BladesItemSheet { // #endregion // #region *** CLOCK KEYS *** ~ const clockKeyControls$ = html.find(".clock-key-control-flipper"); - clockKeyControls$.find("[data-action=\"create-clock-key\"").on({ - click: async (event) => { - event.preventDefault(); - await this.item.addClockKey(); - // Notify GM - } - }); // #region isOnDisplay === TRUE OR FALSE (Conditional Animation Checks Required) ~ clockKeyControls$.find("[data-action=\"toggle-name-visibility\"]").on({ click: async (event) => { @@ -261,7 +261,8 @@ class BladesClockKeeperSheet extends BladesItemSheet { const [clockKey, clock] = getClockFromEvent(event); const minDelta = -1 * clock.value; const maxDelta = clock.max - clock.value; - const value = U.gsap.utils.clamp(U.pInt($(event.currentTarget).data("value")), minDelta, maxDelta); + const value = U.gsap.utils.clamp(minDelta, maxDelta, U.pInt($(event.currentTarget).data("value"))); + eLog.checkLog3("BladesClockKeeperSheet", "changeSegments", { event, clock, minDelta, maxDelta, value }); if (value > 0) { await clock.fillSegments(value); } diff --git a/scss/components/_clocks.scss b/scss/components/_clocks.scss index a8249528..325ab9cf 100644 --- a/scss/components/_clocks.scss +++ b/scss/components/_clocks.scss @@ -104,7 +104,7 @@ $key-sizes: ( 1: (height: 836px, width: 230px, labelTop: 0px, clockSize: 169px), - 2: (height: 625.438px, width: 197.009px, labelTop: 100px, clockSize: 108px), + 2: (height: 625.438px, width: 197.009px, labelTop: 150px, clockSize: 108px), 3: (height: 915.936px, width: 277.634px, labelTop: 0px, clockSize: 108px), 4: (height: 1041px, width: 368.697px, labelTop: -100px, clockSize: 108px), 5: (height: 1148.657px, width: 368.698px, labelTop: 0px, clockSize: 108px), @@ -115,8 +115,8 @@ 0: (x: 111.011px, y: 108.5px) ), 2: ( - 0: (x: 98.579px, y: 280px), - 1: (x: 98.579px, y: 100px) + 0: (x: 98.579px, y: 100px), + 1: (x: 98.579px, y: 280px) ), 3: ( 0: (x: 138.892px, y: 100px), @@ -151,8 +151,8 @@ 0: (x: 0, y: 0px, align: center, width: 100%), ), 2: ( - 0: (x: 0, y: 0px, align: center, width: 100%), - 1: (x: 0, y: 325px, align: center, width: 100%), + 0: (x: 0%, y: 90%), + 1: (x: 100%, y: -15%), ), 3: ( 0: (x: 0, y: 0px, align: center, width: 100%), @@ -206,6 +206,25 @@ // background: rgba(255, 0, 255, 0.25); // outline: 2px dotted rgb(255, 0, 255); + @each $key, $labels in $label-positions { + &[data-size="#{$key}"] { + + .clock-key { + .key-image-container { + @each $label, $pos in $labels { + .clock-container:nth-of-type(#{$label + 1}) { + .clock-label { + left: #{map-get($pos, "x")}; + top: #{map-get($pos, "y")}; + } + } + } + } + } + } + } + + @each $key, $clocks in $clock-positions { &[data-size="#{$key}"] { --key-height: #{map-get(map-get($key-sizes, $key), "height")}; @@ -241,23 +260,21 @@ .key-label { font-family: var(--font-emphasis); - font-size: toRem(48px); + font-size: 48px; + line-height: 48px; font-weight: bold; text-transform: uppercase; + text-align: center; letter-spacing: 1px; top: var(--label-top); z-index: 20; - width: 200%; - pointer-events: all; + width: max-content; 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); - white-space: nowrap; - // rotate: -30deg; - left: -50%; + 0 0 10px var(--blades-black-dark), + 0 0 10px var(--blades-black-dark); + white-space: balance; + left: 50%; position: absolute; } @@ -328,17 +345,19 @@ .clock-label { position: absolute; - transform: translate(-50%, -50%); - top: 50%; - left: 50%; + transform: translate(-50%, 0%); + // 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; + // text-align: center; white-space: nowrap; + width: max-content; + height: auto; } .clock-frame { z-index: 3; } diff --git a/scss/sheets/_clock-keeper-sheet.scss b/scss/sheets/_clock-keeper-sheet.scss index b394e242..bc1e7816 100644 --- a/scss/sheets/_clock-keeper-sheet.scss +++ b/scss/sheets/_clock-keeper-sheet.scss @@ -7,38 +7,47 @@ form { + --icon-size: 25px; + .button-icon, .toggle-icon { position: relative; - width: auto; - height: auto; + width: var(--icon-size); + height: var(--icon-size); line-height: unset; - margin: 0 5px; + margin: 0 calc(var(--icon-size) / 8); + text-shadow: + 0px 0px 3px var(--blades-black-dark), + 0px 0px 3px var(--blades-black-dark); + + &.clock-control-delete-key { + min-width: 20px; + color: var(--blades-red); + text-align: center; + margin-left: 6px; + } + + &.clock-control-pull-key { + text-shadow: none; + } i { margin: 0; width: auto; height: auto; line-height: unset; - font-size: 20px; - // text-shadow: var(--text-shadow-dark); + font-size: calc(var(--icon-size) * 0.8); + transition: 0.05s; + transform-origin: 50% 50%; + pointer-events: auto; opacity: 1; - &.fa-duotone { - transition: 0.25s; - transform-origin: 50% 50%; - pointer-events: auto; - // &::before { - // color: var(--icon-primary-color); - // opacity: var(--icon-primary-opacity, 1); - // } - // &::after { - // color: var(--icon-secondary-color); - // opacity: var(--icon-secondary-opacity, 1); - // } - &:hover { - scale: 1.1; - filter: brightness(1.5) saturate(1.5); - } + &[class*="slash"] { + opacity: 0.5; + } + + &:hover { + scale: 1.1; + filter: brightness(1.5) saturate(1.5); } } } @@ -96,13 +105,14 @@ line-height: 30px; width: 100%; padding: 0px; - border-radius: 5px; display: flex; align-items: center; justify-content: stretch; - background: linear-gradient(45deg, var(--blades-grey-bright), var(--blades-grey-dark)); - font-size: 24px; - box-shadow: inset 0 0 2px 2px var(--blades-black-dark); + + .clock-key-input-name { + font-family: var(--font-emphasis-narrow); + padding-bottom: 3px; + } > div { position: absolute; @@ -113,6 +123,10 @@ flex-direction: row; justify-content: space-between; align-items: center; + background: linear-gradient(45deg, var(--blades-grey-bright), var(--blades-grey-dark)); + font-size: 24px; + box-shadow: inset 0 0 2px 2px var(--blades-black-dark); + color: var(--blades-white-bright); height: 30px; line-height: 30px; @@ -122,13 +136,22 @@ &.controls-back { color: var(--blades-black); - background: linear-gradient(45deg, var(--blades-white-bright), var(--blades-grey-bright));; + background: linear-gradient(45deg, var(--blades-white-bright), var(--blades-grey-bright)); + + .button-icon, .toggle-icon { + text-shadow: none; + } } + } + + .clock-control-segment-buttons { + height: 100%; + display: flex; + align-items: center; + margin: 0 5px; .button-icon { - i[class*="slash"] { - opacity: 0.5; - } + margin: 0; } } @@ -136,16 +159,47 @@ height: 20px; line-height: 20px; font-size: 16px; + background: transparent; > div { height: 20px; line-height: 20px; + margin-left: 40px; + width: calc(100% - 40px); + + input[type="text"], + select.clock-control-select { + height: 20px; + line-height: 20px; + font-size: 14px; + } - .button-icon { - i { - font-size: 12px; + select.clock-control-select { + text-indent: 0; + min-width: 40px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + text-align: center; + font-weight: bold; + font-family: var(--font-emphasis); + margin: 0 5px; + + option { + text-align: center; } } + + + .button-icon, .toggle-icon { + --icon-size: 15px; + + &.clock-control-delete-clock { + color: var(--blades-red); + min-width: 20px; + } + + } } } diff --git a/templates/parts/clock-sheet-clock-controls.hbs b/templates/parts/clock-sheet-clock-controls.hbs index 91c2b1c8..2f3f8ff1 100644 --- a/templates/parts/clock-sheet-clock-controls.hbs +++ b/templates/parts/clock-sheet-clock-controls.hbs @@ -40,8 +40,9 @@ value="{{clock.name}}" /> - {{!-- Adding / Removing Clock Segments --}} + {{!-- Adding Clock Segments --}} +
{{!-- Add One Segment --}} {{> "systems/eunos-blades/templates/components/button-icon.hbs" blockClass="clock-control-button clock-add-segment" @@ -68,7 +69,11 @@ action="change-segments" value="3" }} +
+ {{!-- Removing Clock Segments --}} + +
{{!-- Remove One Segment --}} {{> "systems/eunos-blades/templates/components/button-icon.hbs" blockClass="clock-control-button clock-remove-segment" @@ -95,6 +100,7 @@ action="change-segments" value="-3" }} +
diff --git a/templates/parts/clock-sheet-key-controls.hbs b/templates/parts/clock-sheet-key-controls.hbs index a06b4896..34946517 100644 --- a/templates/parts/clock-sheet-key-controls.hbs +++ b/templates/parts/clock-sheet-key-controls.hbs @@ -1,11 +1,12 @@
+ {{#if clockKey.isOnDisplay}}
{{!-- Pull Key Animation --}} {{> "systems/eunos-blades/templates/components/button-icon.hbs" blockClass="clock-control-button clock-control-pull-key" buttonClass="fa-duotone fa-circle-up-left" - buttonStyle="--fa-primary-color: var(--blades-red); --fa-secondary-color: var(--blades-red-dark);" + buttonStyle="--fa-primary-color: var(--blades-red-bright); --fa-secondary-color: var(--blades-black); --fa-secondary-opacity: 1;" action="pull-clock-key" }} @@ -31,7 +32,7 @@ value="{{clockKey.name}}" />
- + {{else}}
{{#if isSceneTab}} {{!-- Drop Key --}} @@ -99,6 +100,7 @@ {{/if}} {{/if}}
+ {{/if}}
diff --git a/ts/classes/BladesClocks.ts b/ts/classes/BladesClocks.ts index c700e281..96443a59 100644 --- a/ts/classes/BladesClocks.ts +++ b/ts/classes/BladesClocks.ts @@ -333,7 +333,7 @@ class BladesClockKey extends BladesTargetLink implements ); $(clockKeyHTML).appendTo(containerElem$); this.removePositionDragger(); - this.initClockKeyElem(); + this.initClockKeyElem(ClockKeyDisplayMode.full); this.activateClockListeners(); this.initOverlayElement(callback); } @@ -399,7 +399,7 @@ class BladesClockKey extends BladesTargetLink implements } - initClockKeyElem(): void { + initClockKeyElem(displayModeOverride?: ClockKeyDisplayMode | number): void { if (!this.containerElem$) { throw new Error(`[BladesClockKey.initClockKeyElem] Error containerElem$ not found for key '${this.id}'.`); } if (!this.elem$) { throw new Error(`[BladesClockKey.initClockKeyElem] Error elem$ not found for key '${this.id}'.`); } @@ -411,7 +411,12 @@ class BladesClockKey extends BladesTargetLink implements }); } - const {keyTweenVars, keyContTweenVars} = this.getVarsForDisplayMode(this.displayMode); + // If the key has a name, apply adjustments to the label container for a pleasing aspect ratio + if (this.name && this.labelElem$) { + U.adjustTextContainerAspectRatio(this.labelElem$, 2, 100); + } + + const {keyTweenVars, keyContTweenVars} = this.getVarsForDisplayMode(displayModeOverride ?? this.displayMode); const keyImgContainer = this.elem$.find(".key-image-container")[0]; if (!keyImgContainer) { throw new Error(`[BladesClockKey.initOverlayElement] Error keyImgContainer not found for key '${this.id}'.`); } @@ -521,10 +526,10 @@ class BladesClockKey extends BladesTargetLink implements displayMode = this.activeClocks[0].index; } } else if (/^present/.exec(`${displayMode}`)) { - // Are we presenting? If so, get the presentingClock and reduce displayMode to the clock index. - displayMode = U.pInt(`${displayMode}`.replace("present", "")) - 1; + // Are we presenting? If so, get the presentingClock and the clock index. + displayMode = U.pInt(`${displayMode}`.replace("present", "")); if (displayMode < 0 || displayMode >= this.size) { - throw new Error(`[BladesClockKey.getVarsForDisplayMode] Error display mode 'present${displayMode + 1}' is not a valid clock index for key '${this.id}'.`); + throw new Error(`[BladesClockKey.getVarsForDisplayMode] Error display mode 'present${displayMode}' is not a valid clock index for key '${this.id}'.`); } presentingClock = this.getClockByIndex(displayMode as ClockIndex); } @@ -649,7 +654,8 @@ class BladesClockKey extends BladesTargetLink implements ignoreMargin: true, duration: 0.75 }) - .textJitter(this.labelElem$); + .to(this.labelElem$, {xPercent: -50, duration: 0.75}, 0); + // .textJitter(this.labelElem$); } return this._nameFadeInTimeline as gsap.core.Timeline; } @@ -984,13 +990,13 @@ class BladesClock extends BladesTargetLink implements Blades if (!this._nameFadeInTimeline) { this._nameFadeInTimeline = U.gsap.timeline({ callbackScope: this, - data: {}, - onComplete() { - this.nameFadeInTimeline.data.textJitterTimeline = U.gsap.effects.textJitter(this.labelElem$).play(); - }, - onReverseComplete() { - this.nameFadeInTimeline.data.textJitterTimeline.kill(); - } + data: {} + // onComplete() { + // this.nameFadeInTimeline.data.textJitterTimeline = U.gsap.effects.textJitter(this.labelElem$).play(); + // }, + // onReverseComplete() { + // this.nameFadeInTimeline.data.textJitterTimeline.kill(); + // } }).blurReveal(this.labelElem$, { ignoreMargin: true, duration: 0.75 @@ -1080,6 +1086,40 @@ class BladesClock extends BladesTargetLink implements Blades // clock.fadeOutClockName_SocketCall(); // clock.highlight_SocketCall(); // clock.unhighlight_SocketCall(); + changeSegments_Animation(delta: number, callback?: () => void): gsap.core.Timeline { + const tl = U.gsap.timeline({ + callbackScope: this, + onComplete() { + callback?.(); + } + }); + + return tl; + + // const clockKey = game.eunoblades.ClockKeys.get("brMaMG9ogeEvvuXD"); + // const clock = Array.from(clockKey.clocks)[1]; + // const oneSegments = Array.from(clock.elem$.find(".clock-one-segment")); + // function getRotationAngle(clock, segment) { + // const stepSize = 360 / clock.max; + // return stepSize * (segment - 1); + // } + // function rotateOneSegment(clock, oneSegment, segmentNum) { + // const angle = getRotationAngle(clock, segmentNum); + // U.gsap.set(oneSegment, {rotation: angle}); + // } + // function addSegments(amount) { + // while (clock.value + amount > clock.max) { amount--; } + // const oneSegs = [...oneSegments].slice(0, amount); + // for (let i = 1; i <= amount; i++) { + // const thisSegment = clock.value + i; + // rotateOneSegment(clock, oneSegs[i-1], thisSegment); + // } + // U.gsap.fromTo(oneSegs, {scale: 1.5}, {scale: 1, autoAlpha: 1, duration: 1, stagger: 0.5, onComplete() { + // U.gsap.to(oneSegs, {autoAlpha: 0, duration: 1, delay: 2}); + // } + // }); + // } + } // clock.changeSegments_SocketCall(value) // #endregion @@ -1115,8 +1155,9 @@ class BladesClock extends BladesTargetLink implements Blades } override async delete() { + const {parentKey} = this; await super.delete(); - this.parentKey?.updateClockIndices(); + parentKey.updateClockIndices(); } // #endregion diff --git a/ts/core/constants.ts b/ts/core/constants.ts index 0593eb9a..512453d9 100644 --- a/ts/core/constants.ts +++ b/ts/core/constants.ts @@ -390,12 +390,12 @@ export enum ClockKeyDisplayMode { full = "full", clocks = "clocks", activeClocks = "activeClocks", + present0 = "present0", present1 = "present1", present2 = "present2", present3 = "present3", present4 = "present4", - present5 = "present5", - present6 = "present6" + present5 = "present5" } // #endregion diff --git a/ts/core/utilities.ts b/ts/core/utilities.ts index dccc51ea..633e2d7a 100644 --- a/ts/core/utilities.ts +++ b/ts/core/utilities.ts @@ -1472,6 +1472,58 @@ const changeContainer = (elem: HTMLElement, container: HTMLElement) => { gsap.set(elem, relPos); }; +const adjustTextContainerAspectRatio = ( + textContainer: HTMLElement|JQuery, + targetRatio: number, + maxHeight?: number, + maxWidth?: number, + minFontSize = 8 +): void => { + textContainer = $(textContainer)[0]; + const style = window.getComputedStyle(textContainer); + const lineHeight = parseFloat(style.lineHeight); + const initialWidth = parseFloat(style.width); + let bestWidth = initialWidth; + + for (let lines = 1; ; lines++) { + const expectedHeight = lineHeight * lines; + const expectedWidth = initialWidth / lines; + const expectedRatio = expectedWidth / expectedHeight; + + if (expectedRatio < targetRatio) { + break; + } + + if (maxHeight && expectedHeight > maxHeight) { + // If a maximum height is provided and we've exceeded that, + // reduce the font size and line height by 80% and recursively return this function to try again + const newFontSize = parseFloat(style.fontSize) * 0.8; + const newLineHeight = parseFloat(style.lineHeight) * 0.8; + if (newFontSize <= minFontSize) { + break; + } + textContainer.style.fontSize = `${newFontSize}px`; + textContainer.style.lineHeight = `${newLineHeight}px`; + return adjustTextContainerAspectRatio(textContainer, targetRatio, maxHeight, maxWidth); + } + + bestWidth = expectedWidth; + } + + // If a maximum width is provided but we've exceeded that, + // reduce the font size and line height by 80% and recursively return this function to try again + if (maxWidth && bestWidth > maxWidth) { + const newFontSize = parseFloat(style.fontSize) * 0.8; + const newLineHeight = parseFloat(style.lineHeight) * 0.8; + textContainer.style.fontSize = `${newFontSize}px`; + textContainer.style.lineHeight = `${newLineHeight}px`; + return adjustTextContainerAspectRatio(textContainer, targetRatio, maxHeight, maxWidth); + } + + // Apply the best width + textContainer.style.width = `${bestWidth}px`; +}; + const getSvgCode = (svgDotKey: string, svgPathKeys?: string|string[]) => { const svgData = getProperty(SVGDATA, svgDotKey) as HbsSvgData|undefined; @@ -1896,7 +1948,7 @@ export default { // ████████ HTML: Parsing HTML Code, Manipulating DOM Objects ████████ getSvgCode, - changeContainer, + changeContainer, adjustTextContainerAspectRatio, getRawCirclePath, drawCirclePath, diff --git a/ts/documents/items/BladesClockKeeper.ts b/ts/documents/items/BladesClockKeeper.ts index 8c623647..ae09c4fd 100644 --- a/ts/documents/items/BladesClockKeeper.ts +++ b/ts/documents/items/BladesClockKeeper.ts @@ -68,7 +68,7 @@ class BladesClockKeeper extends BladesItem implements BladesItemSubClass.Clock_K getSceneKeys(sceneID?: IDString): Collection { sceneID ??= this.targetSceneID; - return new Collection(this.keys + return new Collection(Array.from(game.eunoblades.ClockKeys) .filter((clockKey) => clockKey.sceneIDs.includes(sceneID as IDString)) .map((clockKey) => [clockKey.id, clockKey])); } diff --git a/ts/sheets/item/BladesClockKeeperSheet.ts b/ts/sheets/item/BladesClockKeeperSheet.ts index afd3dc17..d42124db 100644 --- a/ts/sheets/item/BladesClockKeeperSheet.ts +++ b/ts/sheets/item/BladesClockKeeperSheet.ts @@ -58,6 +58,14 @@ class BladesClockKeeperSheet extends BladesItemSheet { override async activateListeners(html: JQuery) { super.activateListeners(html); + html.find("[data-action=\"create-clock-key\"").on({ + click: async (event: ClickEvent) => { + event.preventDefault(); + await this.item.addClockKey(); + // Notify GM + } + }); + // #region Helper Functions to Retrieve Clock Keys & Clocks ~ function getClockKeyFromEvent(event: ClickEvent | ChangeEvent): BladesClockKey { const id = $(event.currentTarget).data("keyId") @@ -100,14 +108,6 @@ class BladesClockKeeperSheet extends BladesItemSheet { const clockKeyControls$ = html.find(".clock-key-control-flipper"); - clockKeyControls$.find("[data-action=\"create-clock-key\"").on({ - click: async (event: ClickEvent) => { - event.preventDefault(); - await this.item.addClockKey(); - // Notify GM - } - }); - // #region isOnDisplay === TRUE OR FALSE (Conditional Animation Checks Required) ~ clockKeyControls$.find("[data-action=\"toggle-name-visibility\"]").on({ click: async (event: ClickEvent) => { @@ -297,10 +297,11 @@ class BladesClockKeeperSheet extends BladesItemSheet { const minDelta = -1 * clock.value; const maxDelta = clock.max - clock.value; const value = U.gsap.utils.clamp( - U.pInt($(event.currentTarget).data("value")), minDelta, - maxDelta + maxDelta, + U.pInt($(event.currentTarget).data("value")) ); + eLog.checkLog3("BladesClockKeeperSheet", "changeSegments", {event, clock, minDelta, maxDelta, value}); if (value > 0) { await clock.fillSegments(value);