1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Add mode button to main menu

This commit is contained in:
Greg Considine 2021-03-14 07:10:29 -04:00
parent 71d5b02e02
commit 5ccb2dbd0a
3 changed files with 41 additions and 0 deletions

View File

@ -439,6 +439,27 @@
}
}
.bottomContainer {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
@include S(padding-top, 10px);
height: 100%;
width: 100%;
box-sizing: border-box;
.buttons {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-column-gap: 10px;
align-items: start;
height: 100%;
width: 100%;
box-sizing: border-box;
}
}
.footer {
display: grid;
flex-grow: 1;

View File

@ -82,6 +82,9 @@ export class MainMenuState extends GameState {
}
<div class="buttons"></div>
</div>
<div class="bottomContainer">
<div class="buttons"></div>
</div>
</div>
<div class="footer ${G_CHINA_VERSION ? "china" : ""}">
@ -304,6 +307,22 @@ export class MainMenuState extends GameState {
this.trackClicks(playBtn, this.onPlayButtonClicked);
buttonContainer.appendChild(importButtonElement);
}
const modeButtonContainer = this.htmlElement.querySelector(".bottomContainer .buttons");
removeAllChildren(modeButtonContainer);
const puzzleModeButton = makeButton(
modeButtonContainer,
["styledButton"],
T.mainMenu.puzzleMode
);
modeButtonContainer.appendChild(puzzleModeButton);
this.trackClicks(puzzleModeButton, this.onPuzzleModeButtonClicked);
}
onPuzzleModeButtonClicked() {
this.moveToState("InGameState");
}
onSteamLinkClicked() {

View File

@ -116,6 +116,7 @@ mainMenu:
savegameLevel: Level <x>
savegameLevelUnknown: Unknown Level
savegameUnnamed: Unnamed
puzzleMode: Puzzle Mode
dialogs:
buttons: