mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-18 13:59:20 +00:00
changed toolbar to completely hide editor buildings in test mode
This commit is contained in:
parent
2add9ba18f
commit
900fcc8479
@ -49,97 +49,99 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.building {
|
.building {
|
||||||
display: flex;
|
&:not(.hidden) {
|
||||||
@include S(width, 40px);
|
|
||||||
position: relative;
|
|
||||||
@include S(height, 40px);
|
|
||||||
.icon {
|
|
||||||
color: $accentColorDark;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
@include S(width, 40px);
|
||||||
position: relative;
|
position: relative;
|
||||||
align-items: center;
|
@include S(height, 40px);
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
@include S(border-radius, $globalBorderRadius);
|
|
||||||
|
|
||||||
background: center center / 70% no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.unlocked) {
|
|
||||||
@include S(width, 25px);
|
|
||||||
.icon {
|
.icon {
|
||||||
opacity: 0.15;
|
color: $accentColorDark;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
position: relative;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
|
||||||
|
background: center center / 70% no-repeat;
|
||||||
}
|
}
|
||||||
&.editor {
|
|
||||||
|
&:not(.unlocked) {
|
||||||
|
@include S(width, 25px);
|
||||||
.icon {
|
.icon {
|
||||||
pointer-events: all;
|
opacity: 0.15;
|
||||||
cursor: pointer;
|
}
|
||||||
&:hover {
|
&.editor {
|
||||||
background-color: rgba(22, 30, 68, 0.1);
|
.icon {
|
||||||
|
pointer-events: all;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(22, 30, 68, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:not(.editor) {
|
||||||
|
.icon {
|
||||||
|
background-image: uiResource("locked_building.png") !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:not(.editor) {
|
|
||||||
|
&.unlocked {
|
||||||
.icon {
|
.icon {
|
||||||
background-image: uiResource("locked_building.png") !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.unlocked {
|
|
||||||
.icon {
|
|
||||||
pointer-events: all;
|
|
||||||
transition: all 50ms ease-in-out;
|
|
||||||
transition-property: background-color, transform;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: rgba(30, 40, 90, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.pressed {
|
|
||||||
transform: scale(0.9) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.selected {
|
|
||||||
// transform: scale(1.05);
|
|
||||||
background-color: rgba(lighten($colorBlueBright, 9), 0.4);
|
|
||||||
@include S(border-radius, 2px);
|
|
||||||
|
|
||||||
.keybinding {
|
|
||||||
color: #111;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.puzzle-lock {
|
|
||||||
&.active {
|
|
||||||
& {
|
|
||||||
/* @load-async */
|
|
||||||
background: uiResource("locked_building.png") center center / 90% no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
display: grid;
|
|
||||||
grid-auto-flow: column;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
@include S(top, -15px);
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%) !important;
|
|
||||||
transition: all 0.12s ease-in-out;
|
|
||||||
transition-property: opacity, transform;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
|
transition: all 50ms ease-in-out;
|
||||||
@include S(width, 12px);
|
transition-property: background-color, transform;
|
||||||
@include S(height, 12px);
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.5;
|
background-color: rgba(30, 40, 90, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.pressed {
|
||||||
|
transform: scale(0.9) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.selected {
|
||||||
|
// transform: scale(1.05);
|
||||||
|
background-color: rgba(lighten($colorBlueBright, 9), 0.4);
|
||||||
|
@include S(border-radius, 2px);
|
||||||
|
|
||||||
|
.keybinding {
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.puzzle-lock {
|
||||||
|
&.active {
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("locked_building.png") center center / 90% no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, -15px);
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%) !important;
|
||||||
|
transition: all 0.12s ease-in-out;
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: all;
|
||||||
|
|
||||||
|
@include S(width, 12px);
|
||||||
|
@include S(height, 12px);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -296,7 +296,7 @@ export class HUDBaseToolbar extends BaseHUDPart {
|
|||||||
const metaBuilding = this.requiredBuildings[i];
|
const metaBuilding = this.requiredBuildings[i];
|
||||||
const handle = this.buildingHandles[metaBuilding.getId()];
|
const handle = this.buildingHandles[metaBuilding.getId()];
|
||||||
handle.puzzleLocked = testMode;
|
handle.puzzleLocked = testMode;
|
||||||
handle.element.classList.toggle("unlocked", !testMode);
|
handle.element.classList.toggle("hidden", testMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user