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:
parent
6a3e720182
commit
72499110a7
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user