Titol de finestra i ESC per a eixir

This commit is contained in:
2026-05-18 13:31:27 +02:00
parent 28f2d91c5c
commit 446d812270
3 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -51,8 +51,8 @@ LEVEL_INI = 1
-- Mapeig per defecte: cursors per a moure's, Z/X per a fer forats.
-- Pots usar qualsevol constant KEY_* del intérpret (KEY_A..KEY_Z,
-- KEY_UP/DOWN/LEFT/RIGHT, KEY_SPACE, KEY_RETURN, ...).
-- Nota: KEY_ESCAPE no es pot usar — l'intérpret la captura per a la seua
-- consola de debug abans que Lua la veja.
-- Nota: ESC a seques tanca el joc (la consola de debug del intérpret
-- s'obri amb CTRL+ESC desde la versió 0.7.8 de ascii).
keys = {
up = KEY_UP,
down = KEY_DOWN,
+2
View File
@@ -618,6 +618,7 @@ function pintar_hud()
end
function init()
wintitle("© 2000 Pepe Runner — JailDesigner")
mode(1)
border(COLOR_BLUE)
color(COLOR_LIGHT_GRAY, COLOR_BLACK)
@@ -629,6 +630,7 @@ function init()
end
function update()
if btnp(KEY_ESCAPE) then os.exit(0) end
if estat_joc == ESTAT_TITLE then update_title()
elseif estat_joc == ESTAT_PLAYING then update_playing()
elseif estat_joc == ESTAT_GAMEOVER then update_gameover()
+3
View File
@@ -1186,6 +1186,7 @@ function carregar_config()
end
function init()
wintitle("© 2026 Pepe Runner DX — JailDesigner")
carregar_config()
carregar_skin()
mode(1)
@@ -1200,6 +1201,8 @@ function init()
end
function update()
if btnp(KEY_ESCAPE) then os.exit(0) end
-- Contador animat del score: independent de l'estat, així segueix pujant
-- sobre el overlay del game over (no es queda congelat a meitat camí).
if score_display < score and (cnt() % temps.score_step) == 0 then