From 472c543c7ba4ce6e2cec30ea12cdf4cd71b80af4 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 29 May 2026 09:16:55 +0200 Subject: [PATCH] =?UTF-8?q?feat(demo):=20el=20marcador=20mostra=20el=20r?= =?UTF-8?q?=C3=A8tol=20de=20demo=20en=20lloc=20de=20puntuacions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/locale/ca.yaml | 3 +++ data/locale/en.yaml | 3 +++ source/game/scenes/game_scene.cpp | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/data/locale/ca.yaml b/data/locale/ca.yaml index 21e1767..3202ff7 100644 --- a/data/locale/ca.yaml +++ b/data/locale/ca.yaml @@ -27,6 +27,9 @@ hud: title: press_start: "PREMEU START PER JUGAR" +demo: + banner: "MODE DEMO - PREMEU START" + game_screen: game_over: "FI DEL JOC" continue: "CONTINUAR" diff --git a/data/locale/en.yaml b/data/locale/en.yaml index 111c936..9be2fdb 100644 --- a/data/locale/en.yaml +++ b/data/locale/en.yaml @@ -26,6 +26,9 @@ hud: title: press_start: "PRESS START TO PLAY" +demo: + banner: "DEMO MODE - PRESS START" + game_screen: game_over: "GAME OVER" continue: "CONTINUE" diff --git a/source/game/scenes/game_scene.cpp b/source/game/scenes/game_scene.cpp index bf20482..28365e5 100644 --- a/source/game/scenes/game_scene.cpp +++ b/source/game/scenes/game_scene.cpp @@ -917,6 +917,12 @@ void GameScene::drawScoreboard() { .x = scoreboard_zone.w / 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); }