feat(demo): el marcador mostra el rètol de demo en lloc de puntuacions

This commit is contained in:
2026-05-29 09:16:55 +02:00
parent 4e67a67ace
commit 472c543c7b
3 changed files with 12 additions and 0 deletions
+3
View File
@@ -27,6 +27,9 @@ hud:
title: title:
press_start: "PREMEU START PER JUGAR" press_start: "PREMEU START PER JUGAR"
demo:
banner: "MODE DEMO - PREMEU START"
game_screen: game_screen:
game_over: "FI DEL JOC" game_over: "FI DEL JOC"
continue: "CONTINUAR" continue: "CONTINUAR"
+3
View File
@@ -26,6 +26,9 @@ hud:
title: title:
press_start: "PRESS START TO PLAY" press_start: "PRESS START TO PLAY"
demo:
banner: "DEMO MODE - PRESS START"
game_screen: game_screen:
game_over: "GAME OVER" game_over: "GAME OVER"
continue: "CONTINUE" continue: "CONTINUE"
+6
View File
@@ -917,6 +917,12 @@ void GameScene::drawScoreboard() {
.x = scoreboard_zone.w / 2.0F, .x = scoreboard_zone.w / 2.0F,
.y = scoreboard_zone.y + (scoreboard_zone.h / 2.0F), .y = scoreboard_zone.y + (scoreboard_zone.h / 2.0F),
}; };
// En mode demo (attract) el marcador no té sentit: substituïm puntuacions i
// vides per un rètol que indica que és una demo i convida a jugar.
if (match_config_.mode == GameConfig::Mode::DEMO) {
text_.renderCentered(Locale::get().text("demo.banner"), CENTER, SCALE, SPACING);
return;
}
Systems::InitHud::drawScoreboardSegmentsAt(text_, buildScoreboardSegments(), CENTER, SCALE, SPACING); Systems::InitHud::drawScoreboardSegmentsAt(text_, buildScoreboardSegments(), CENTER, SCALE, SPACING);
} }