La versione del gioco nell'angolo del titolo e in fondo alla pausa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ks2K99uqCZjAxvy7Rdj1R
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
<input id="load-file" type="file" accept=".json,application/json" hidden>
|
<input id="load-file" type="file" accept=".json,application/json" hidden>
|
||||||
<p id="load-error" class="load-error" hidden role="alert"></p>
|
<p id="load-error" class="load-error" hidden role="alert"></p>
|
||||||
<p class="dedication">Al Lele, che mi ha fatto conoscere Monkey Island.</p>
|
<p class="dedication">Al Lele, che mi ha fatto conoscere Monkey Island.</p>
|
||||||
|
<p class="version"></p>
|
||||||
</section>
|
</section>
|
||||||
<section id="rione" class="overlay" hidden aria-label="Scegli il rione">
|
<section id="rione" class="overlay" hidden aria-label="Scegli il rione">
|
||||||
<h2>Per chi corri quest'anno?</h2>
|
<h2>Per chi corri quest'anno?</h2>
|
||||||
@@ -79,6 +80,7 @@
|
|||||||
<button id="to-title" class="secondary">Torna al titolo</button>
|
<button id="to-title" class="secondary">Torna al titolo</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="hint">La partita è salvata: dal titolo si riprende con «Continua». Con «Salva su file» la porti su un altro dispositivo e la apri con «Carica».</p>
|
<p class="hint">La partita è salvata: dal titolo si riprende con «Continua». Con «Salva su file» la porti su un altro dispositivo e la apri con «Carica».</p>
|
||||||
|
<p class="version"></p>
|
||||||
</section>
|
</section>
|
||||||
<section id="credits" class="overlay" hidden aria-label="Ringraziamenti">
|
<section id="credits" class="overlay" hidden aria-label="Ringraziamenti">
|
||||||
<h2>Ringraziamenti</h2>
|
<h2>Ringraziamenti</h2>
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@ import { render, loadAssets, hasBackground, WIDTH, HEIGHT } from './engine/rende
|
|||||||
import { readSave, writeSave, clearSave, readAudio, writeAudio, saveFile, saveFileName, readSaveFile } from './engine/storage.js';
|
import { readSave, writeSave, clearSave, readAudio, writeAudio, saveFile, saveFileName, readSaveFile } from './engine/storage.js';
|
||||||
import { Music, trackFor } from './engine/music.js';
|
import { Music, trackFor } from './engine/music.js';
|
||||||
import { Voices } from './engine/voices.js';
|
import { Voices } from './engine/voices.js';
|
||||||
import { versioned } from './version.js';
|
import { VERSION, versioned } from './version.js';
|
||||||
|
|
||||||
const $ = id => document.getElementById(id);
|
const $ = id => document.getElementById(id);
|
||||||
const canvas = $('scene'), ctx = canvas.getContext('2d');
|
const canvas = $('scene'), ctx = canvas.getContext('2d');
|
||||||
@@ -608,6 +608,7 @@ function showSplash() {
|
|||||||
addEventListener('keydown', end, { once: true });
|
addEventListener('keydown', end, { once: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const el of document.querySelectorAll('.version')) el.textContent = `v${VERSION}`;
|
||||||
game = new Game(story);
|
game = new Game(story);
|
||||||
command = new Command(game);
|
command = new Command(game);
|
||||||
showSplash();
|
showSplash();
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ body { display: flex; justify-content: center; overflow-x: hidden; -webkit-tap-h
|
|||||||
background: #0d0910; } /* fondo pieno: finché l'illustrazione non arriva, sotto non si vede il gioco */
|
background: #0d0910; } /* fondo pieno: finché l'illustrazione non arriva, sotto non si vede il gioco */
|
||||||
#title .buttons { margin-top: auto; }
|
#title .buttons { margin-top: auto; }
|
||||||
#title .dedication { margin-bottom: 2%; text-shadow: 2px 2px 0 #000; }
|
#title .dedication { margin-bottom: 2%; text-shadow: 2px 2px 0 #000; }
|
||||||
|
/* La versione (src/version.js), piccola: nell'angolo del titolo e in fondo alla pausa. */
|
||||||
|
.version { margin: 0; font-size: 9px; color: var(--dim); opacity: .75; }
|
||||||
|
#title .version { position: absolute; right: 8px; bottom: 6px; text-shadow: 1px 1px 0 #000; }
|
||||||
#title .subtitle { color: var(--ink); text-shadow: 2px 2px 0 #000; }
|
#title .subtitle { color: var(--ink); text-shadow: 2px 2px 0 #000; }
|
||||||
#intro { justify-content: flex-start; padding-top: 7%; cursor: pointer; image-rendering: pixelated;
|
#intro { justify-content: flex-start; padding-top: 7%; cursor: pointer; image-rendering: pixelated;
|
||||||
background: #0d0910; } /* fondo pieno: finché l'illustrazione non arriva, sotto non si vede il gioco */
|
background: #0d0910; } /* fondo pieno: finché l'illustrazione non arriva, sotto non si vede il gioco */
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ try {
|
|||||||
await page.screenshot({ path: `${OUT}/00b-dissolvenza.png` });
|
await page.screenshot({ path: `${OUT}/00b-dissolvenza.png` });
|
||||||
await page.waitForSelector('#splash', { state: 'hidden', timeout: 3000 });
|
await page.waitForSelector('#splash', { state: 'hidden', timeout: 3000 });
|
||||||
await page.screenshot({ path: `${OUT}/01-titolo.png` });
|
await page.screenshot({ path: `${OUT}/01-titolo.png` });
|
||||||
|
assert.match(await page.textContent('#title .version'), /^v\d+\.\d+\.\d+$/, 'la versione nell\'angolo del titolo');
|
||||||
// Col codice lento ad arrivare (rete vera) il cartello aspetta il titolo: non sfuma prima per conto suo.
|
// Col codice lento ad arrivare (rete vera) il cartello aspetta il titolo: non sfuma prima per conto suo.
|
||||||
{
|
{
|
||||||
const slow = await browser.newPage({ viewport: { width: 1280, height: 860 } });
|
const slow = await browser.newPage({ viewport: { width: 1280, height: 860 } });
|
||||||
|
|||||||
Reference in New Issue
Block a user