1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-12 02:49:20 +00:00

fade out other buttons on test mode

This commit is contained in:
Sense101 2021-07-07 10:47:43 +01:00
parent 6a3e720182
commit 72499110a7
2 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,17 @@
@include S(border-radius, $globalBorderRadius);
> .section {
.disabled {
transition: opacity 0.12s ease-in-out;
opacity: 0.3;
button {
pointer-events: none;
}
}
:not(.disabled) {
transition: opacity 0.12s ease-in-out;
}
> label {
text-transform: uppercase;
}
@ -45,12 +56,6 @@
}
> .mainButtons {
&.disabled {
button {
pointer-events: none;
}
}
> .buttonBar {
display: flex;
align-items: center;

View File

@ -73,6 +73,7 @@ export class HUDPuzzleEditorSettings extends BaseHUDPart {
toggleTestMode() {
this.testMode = !this.testMode;
this.element.querySelector(".section > label").classList.toggle("disabled", this.testMode);
this.element.querySelector(".mainButtons").classList.toggle("disabled", this.testMode);
const testButton = this.element.querySelector(".testToggle > .testPuzzle");
testButton.textContent = this.testMode