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:
parent
71d5b02e02
commit
5ccb2dbd0a
@ -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 {
|
.footer {
|
||||||
display: grid;
|
display: grid;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
@ -82,6 +82,9 @@ export class MainMenuState extends GameState {
|
|||||||
}
|
}
|
||||||
<div class="buttons"></div>
|
<div class="buttons"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="bottomContainer">
|
||||||
|
<div class="buttons"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer ${G_CHINA_VERSION ? "china" : ""}">
|
<div class="footer ${G_CHINA_VERSION ? "china" : ""}">
|
||||||
@ -304,6 +307,22 @@ export class MainMenuState extends GameState {
|
|||||||
this.trackClicks(playBtn, this.onPlayButtonClicked);
|
this.trackClicks(playBtn, this.onPlayButtonClicked);
|
||||||
buttonContainer.appendChild(importButtonElement);
|
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() {
|
onSteamLinkClicked() {
|
||||||
|
@ -116,6 +116,7 @@ mainMenu:
|
|||||||
savegameLevel: Level <x>
|
savegameLevel: Level <x>
|
||||||
savegameLevelUnknown: Unknown Level
|
savegameLevelUnknown: Unknown Level
|
||||||
savegameUnnamed: Unnamed
|
savegameUnnamed: Unnamed
|
||||||
|
puzzleMode: Puzzle Mode
|
||||||
|
|
||||||
dialogs:
|
dialogs:
|
||||||
buttons:
|
buttons:
|
||||||
|
Loading…
Reference in New Issue
Block a user