MAPG-235 go back to start button added to the end of the challenge

This commit is contained in:
Balázs Vigh 2021-05-18 20:22:43 +02:00
parent 62251b1062
commit 7898c52328
3 changed files with 9 additions and 2 deletions

View File

@ -153,6 +153,10 @@
z-index: 2;
}
#goToStart {
display: none;
}
@media screen and (max-width: 599px) {
#mapName {
display: none;

View File

@ -301,7 +301,7 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
Game.transitToResultMap();
Game.showSummary();
document.getElementById('continueButton').style.display = 'none';
//document.getElementById('continueButton').style.display = 'none';
} else {
@ -763,11 +763,13 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
scoreInfo.children[1].style.display = 'block';
document.getElementById('showSummaryButton').style.display = null;
if (!roomId || Game.multi.owner) {
if (Game.type == GameType.SINGLE || Game.multi.owner) {
document.getElementById('startNewGameButton').style.display = 'block';
if (!Game.readyToContinue) {
document.getElementById('startNewGameButton').disabled = true;
}
} else if (Game.type == GameType.CHALLENGE) {
document.getElementById('goToStart').style.display = 'block';
}
var resultBounds = new google.maps.LatLngBounds();

View File

@ -57,6 +57,7 @@
<button id="continueButton" class="fullWidth">Continue</button>
<button id="showSummaryButton" class="fullWidth">Show summary</button>
<button id="startNewGameButton" class="fullWidth">Play this map again</button>
<a href="/" id="goToStart"><button class="fullWidth">Go back to the menu</button></a>
</div>
</div>
<div id="navigation" class="circleControl">