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. -- 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, -- Pots usar qualsevol constant KEY_* del intérpret (KEY_A..KEY_Z,
-- KEY_UP/DOWN/LEFT/RIGHT, KEY_SPACE, KEY_RETURN, ...). -- 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 -- Nota: ESC a seques tanca el joc (la consola de debug del intérpret
-- consola de debug abans que Lua la veja. -- s'obri amb CTRL+ESC desde la versió 0.7.8 de ascii).
keys = { keys = {
up = KEY_UP, up = KEY_UP,
down = KEY_DOWN, down = KEY_DOWN,
+2
View File
@@ -618,6 +618,7 @@ function pintar_hud()
end end
function init() function init()
wintitle("© 2000 Pepe Runner — JailDesigner")
mode(1) mode(1)
border(COLOR_BLUE) border(COLOR_BLUE)
color(COLOR_LIGHT_GRAY, COLOR_BLACK) color(COLOR_LIGHT_GRAY, COLOR_BLACK)
@@ -629,6 +630,7 @@ function init()
end end
function update() function update()
if btnp(KEY_ESCAPE) then os.exit(0) end
if estat_joc == ESTAT_TITLE then update_title() if estat_joc == ESTAT_TITLE then update_title()
elseif estat_joc == ESTAT_PLAYING then update_playing() elseif estat_joc == ESTAT_PLAYING then update_playing()
elseif estat_joc == ESTAT_GAMEOVER then update_gameover() elseif estat_joc == ESTAT_GAMEOVER then update_gameover()
+3
View File
@@ -1186,6 +1186,7 @@ function carregar_config()
end end
function init() function init()
wintitle("© 2026 Pepe Runner DX — JailDesigner")
carregar_config() carregar_config()
carregar_skin() carregar_skin()
mode(1) mode(1)
@@ -1200,6 +1201,8 @@ function init()
end end
function update() function update()
if btnp(KEY_ESCAPE) then os.exit(0) end
-- Contador animat del score: independent de l'estat, així segueix pujant -- Contador animat del score: independent de l'estat, així segueix pujant
-- sobre el overlay del game over (no es queda congelat a meitat camí). -- sobre el overlay del game over (no es queda congelat a meitat camí).
if score_display < score and (cnt() % temps.score_step) == 0 then if score_display < score and (cnt() % temps.score_step) == 0 then