1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add ability to import savegames, add game menu, multiple smaller improvements

This commit is contained in:
tobspr
2020-05-16 17:57:25 +02:00
parent c1d720ca52
commit 224bc6c7e5
31 changed files with 1422 additions and 47 deletions

View File

@@ -22,9 +22,15 @@
opacity: 0;
}
&.loadingDialog {
* {
color: #fff;
}
}
> .dialogInner {
background: #fff;
@include S(min-width, 500px);
@include S(min-width, 300px);
max-width: calc(100vw - #{D(40px)});
max-height: calc(100vh - #{D(40px)});
@include S(border-radius, 4px);
@@ -60,5 +66,27 @@
overflow-y: auto;
pointer-events: all;
}
> .buttons {
@include S(margin-top, 15px);
display: flex;
justify-content: flex-end;
> button {
@include S(margin-left, 8px);
@include Text;
@include S(min-width, 60px);
@include S(padding, 5px, 15px);
&.good {
background-color: $colorGreenBright;
color: #fff;
}
&.bad {
background-color: $colorRedBright;
color: #fff;
}
}
}
}
}

View File

@@ -24,6 +24,8 @@
transition-property: opacity, transform;
opacity: 0.9;
@include S(margin-left, 5px);
position: relative;
@include IncreasedClickArea(0px);
&:hover {
opacity: 0.8;
@@ -80,7 +82,7 @@
border-radius: 0 0 #{D(4px)} #{D(4px)};
@include S(padding-left, 30px);
@include S(margin-right, 3px);
@include IncreasedClickArea(10px);
@include IncreasedClickArea(0px);
@include ButtonText;
@include S(min-height, 30px);
transition: all 0.12s ease-in-out;

View File

@@ -21,8 +21,8 @@
}
transform-origin: 100% 50%;
@include InlineAnimation(5s ease-in-out) {
opacity: 0;
@include InlineAnimation(3s ease-in-out) {
0% {
opacity: 1;
}

View File

@@ -0,0 +1,32 @@
#ingame_HUD_SettingsMenu {
.timePlayed {
position: absolute;
@include S(left, 30px);
@include S(bottom, 30px);
color: #fff;
display: flex;
flex-direction: column;
strong {
text-transform: uppercase;
@include PlainText;
}
span {
@include Heading;
}
}
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.buttons {
display: grid;
grid-auto-flow: row;
@include S(grid-gap, 10px);
background: rgba(0, 10, 20, 0.1);
@include S(padding, 20px);
@include S(border-radius, 2px);
}
}

View File

@@ -3,6 +3,8 @@
@include S(padding-right, 10px);
display: flex;
flex-direction: column;
@include S(width, 500px);
.upgrade {
display: grid;
grid-template-columns: auto 1fr auto;
@@ -99,6 +101,7 @@
display: flex;
flex-direction: column;
align-items: center;
@include S(width, 65px);
button.pin {
@include S(width, 12px);

View File

@@ -1,4 +1,8 @@
#ingame_HUD_Statistics {
.content {
@include S(width, 500px);
}
.filterHeader {
display: grid;
grid-template-columns: auto 1fr;

View File

@@ -37,12 +37,13 @@
@import "ingame_hud/statistics";
@import "ingame_hud/pinned_shapes";
@import "ingame_hud/notifications";
@import "ingame_hud/settings_menu";
// Z-Index
$elements: ingame_Canvas, ingame_VignetteOverlay, ingame_HUD_building_placer, ingame_HUD_PinnedShapes,
ingame_HUD_buildings_toolbar, ingame_HUD_GameMenu, ingame_HUD_KeybindingOverlay, ingame_HUD_Notifications,
ingame_HUD_Shop, ingame_HUD_Statistics, ingame_HUD_BetaOverlay, ingame_HUD_MassSelector,
ingame_HUD_UnlockNotification;
ingame_HUD_UnlockNotification, ingame_HUD_SettingsMenu;
$zindex: 100;
@@ -59,16 +60,15 @@ body.uiHidden {
#ingame_HUD_building_placer,
#ingame_HUD_GameMenu,
#ingame_HUD_MassSelector,
#ingame_HUD_PinnedShapes {
#ingame_HUD_PinnedShapes,
#ingame_HUD_Notifications {
display: none !important;
}
}
body.modalDialogActive,
body.ingameDialogOpen {
#ingame_Canvas,
#ingame_HUD_GameMenu,
#ingame_HUD_KeybindingOverlay,
#ingame_HUD_buildings_toolbar,
#ingame_HUD_PinnedShapes {
filter: blur(5px);
> *:not(.ingameDialog):not(.modalDialogParent) {
filter: blur(5px) !important;
}
}

View File

@@ -5,7 +5,6 @@
flex-direction: column;
background: rgb(140, 165, 194) center center / cover !important;
// background: $colorGreenBright !important;
.fullscreenBackgroundVideo {
z-index: -1;
@@ -36,14 +35,88 @@
}
}
.mainWrapper {
display: grid;
grid-template-columns: 1fr auto 1fr;
@include S(padding, 0, 10px);
align-items: center;
justify-items: center;
@include S(grid-column-gap, 10px);
.standaloneBanner {
background: rgb(255, 225, 238);
@include S(border-radius, 4px);
height: 100%;
box-sizing: border-box;
@include S(padding, 15px);
display: flex;
flex-direction: column;
strong {
font-weight: bold;
}
h3 {
@include Heading;
font-weight: bold;
@include S(margin-bottom, 15px);
text-transform: uppercase;
color: $colorRedBright;
}
p {
@include Text;
}
ul {
@include S(margin-top, 15px);
@include S(padding-left, 20px);
li {
@include Text;
}
}
.steamLink {
width: 100%;
@include S(height, 50px);
background: uiResource("get_on_steam.png") center center / contain no-repeat;
overflow: hidden;
display: block;
text-indent: -999em;
cursor: pointer;
@include S(margin-top, 20px);
pointer-events: all;
transition: all 0.12s ease-in;
transition-property: opacity, transform;
transform: skewX(-0.5deg);
&:hover {
transform: skewX(-1deg) scale(1.02);
opacity: 0.9;
}
}
}
}
.logo {
display: flex;
flex-grow: 1;
align-items: center;
justify-content: center;
flex-direction: column;
@include S(padding-top, 20px);
img {
@include S(width, 350px);
}
.demoBadge {
@include S(margin, 10px, 0);
@include S(width, 100px);
@include S(height, 30px);
background: uiResource("demo_badge.png") center center / contain no-repeat;
display: inline-block;
}
}
.betaWarning {
@@ -53,12 +126,11 @@
@include S(padding, 10px);
@include S(border-radius, 4px);
color: #fff;
@include S(margin-bottom, 10px);
@include S(margin-top, 10px);
border: #{D(2px)} solid rgba(0, 10, 20, 0.1);
}
.mainContainer {
@include S(margin-top, 10px);
display: flex;
align-items: center;
justify-content: flex-start;
@@ -67,6 +139,8 @@
@include S(padding, 20px);
@include S(border-radius, 4px);
// border: #{D(2px)} solid rgba(0, 10, 20, 0.1);
height: 100%;
box-sizing: border-box;
.playButton {
@include SuperHeading;
@@ -82,8 +156,12 @@
}
}
.importButton {
@include S(margin-top, 15px);
}
.savegames {
@include S(max-height, 92px);
@include S(max-height, 105px);
overflow-y: auto;
@include S(width, 250px);
pointer-events: all;
@@ -101,6 +179,7 @@
grid-template-columns: 1fr auto auto;
grid-template-rows: auto auto;
@include S(grid-column-gap, 5px);
@include S(grid-row-gap, 3px);
.internalId {
grid-column: 1 / 2;
@@ -116,7 +195,8 @@
}
button.resumeGame,
button.downloadGame {
button.downloadGame,
button.deleteGame {
grid-column: 3 / 4;
grid-row: 1 / 3;
@include S(width, 30px);
@@ -128,8 +208,22 @@
button.downloadGame {
grid-column: 2 / 3;
grid-row: 1 / 2;
background-image: uiResource("icons/download.png");
@include S(width, 15px);
@include IncreasedClickArea(0px);
@include S(height, 15px);
align-self: end;
background-size: 60%;
}
button.deleteGame {
grid-column: 2 / 3;
grid-row: 2 / 3;
background-color: $colorRedBright;
@include IncreasedClickArea(0px);
background-image: uiResource("icons/delete.png");
@include S(width, 15px);
@include S(height, 15px);
align-self: end;
background-size: 60%;