Canviades les funcions d'imprimir el text en la redifinició de teclat i gamepad

This commit is contained in:
2026-03-16 23:11:44 +01:00
parent 3a7fa45013
commit 6304c6ff06

View File

@@ -449,7 +449,8 @@ function update_redefine_keys_menu()
menu_state = update_options_menu; menu_state = update_options_menu;
end end
if menu_count==0 then if menu_count==0 then
text("PULSA TECLA PER A AMUNT", 20, 24, 13) -- text("PULSA TECLA PER A AMUNT", 20, 24, 13)
arc_textB("PULSA TECLA PER A AMUNT", 20*o2aX, 24*o2aX, 13)
local k = key.press(); local k = key.press();
if k ~= 0 and k~=key.ESCAPE then if k ~= 0 and k~=key.ESCAPE then
menu_count = 1 menu_count = 1
@@ -457,7 +458,8 @@ function update_redefine_keys_menu()
config.key("keyup", keyUp) config.key("keyup", keyUp)
end end
elseif menu_count==1 then elseif menu_count==1 then
text("PULSA TECLA PER A AVALL", 20, 24, 13) -- text("PULSA TECLA PER A AVALL", 20, 24, 13)
arc_textB("PULSA TECLA PER A AVALL", 20*o2aX, 24*o2aX, 13)
local k = key.press(); local k = key.press();
if k ~= 0 and k~=key.ESCAPE then if k ~= 0 and k~=key.ESCAPE then
menu_count = 2 menu_count = 2
@@ -465,7 +467,8 @@ function update_redefine_keys_menu()
config.key("keydown", keyDown) config.key("keydown", keyDown)
end end
elseif menu_count==2 then elseif menu_count==2 then
text("PULSA TECLA PER A ESQUERRA", 14, 24, 13) -- text("PULSA TECLA PER A ESQUERRA", 14, 24, 13)
arc_textB("PULSA TECLA PER A ESQUERRA", 14*o2aX, 24*o2aX, 13)
local k = key.press(); local k = key.press();
if k ~= 0 and k~=key.ESCAPE then if k ~= 0 and k~=key.ESCAPE then
menu_count = 3 menu_count = 3
@@ -473,7 +476,8 @@ function update_redefine_keys_menu()
config.key("keleft", keyLeft) config.key("keleft", keyLeft)
end end
elseif menu_count==3 then elseif menu_count==3 then
text("PULSA TECLA PER A DRETA", 20, 24, 13) -- text("PULSA TECLA PER A DRETA", 20, 24, 13)
arc_textB("PULSA TECLA PER A DRETA", 20*o2aX, 24*o2aX, 13)
local k = key.press(); local k = key.press();
if k ~= 0 and k~=key.ESCAPE then if k ~= 0 and k~=key.ESCAPE then
menu_count = 4 menu_count = 4
@@ -481,7 +485,8 @@ function update_redefine_keys_menu()
config.key("keyright", keyRight) config.key("keyright", keyRight)
end end
elseif menu_count==4 then elseif menu_count==4 then
text("PULSA TECLA PER A BOTAR", 20, 24, 13) -- text("PULSA TECLA PER A BOTAR", 20, 24, 13)
arc_textB("PULSA TECLA PER A BOTAR", 20*o2aX, 24*o2aX, 13)
local k = key.press(); local k = key.press();
if k ~= 0 and k~=key.ESCAPE then if k ~= 0 and k~=key.ESCAPE then
menu_count = 5 menu_count = 5
@@ -489,7 +494,8 @@ function update_redefine_keys_menu()
config.key("keyjump", keyJump) config.key("keyjump", keyJump)
end end
elseif menu_count==5 then elseif menu_count==5 then
text("PULSA TECLA PER A DISPAR", 18, 24, 13) -- text("PULSA TECLA PER A DISPAR", 18, 24, 13)
arc_textB("PULSA TECLA PER A DISPAR", 18*o2aX, 24*o2aX, 13)
local k = key.press(); local k = key.press();
if k ~= 0 and k~=key.ESCAPE then if k ~= 0 and k~=key.ESCAPE then
menu_count = 0 menu_count = 0
@@ -506,7 +512,8 @@ function update_redefine_pad_menu()
menu_state = update_options_menu; menu_state = update_options_menu;
end end
if menu_count==0 then if menu_count==0 then
text("PULSA BOTÓ PER A AMUNT", 22, 24, 13) -- text("PULSA BOTÓ PER A AMUNT", 22, 24, 13)
arc_textB("PULSA BOTÓ PER A AMUNT", 22*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 1 menu_count = 1
@@ -514,7 +521,8 @@ function update_redefine_pad_menu()
config.key("btnup", btnUp) config.key("btnup", btnUp)
end end
elseif menu_count==1 then elseif menu_count==1 then
text("PULSA BOTÓ PER A AVALL", 22, 24, 13) -- text("PULSA BOTÓ PER A AVALL", 22, 24, 13)
arc_textB("PULSA BOTÓ PER A AVALL", 22*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 2 menu_count = 2
@@ -522,7 +530,8 @@ function update_redefine_pad_menu()
config.key("btndown", btnDown) config.key("btndown", btnDown)
end end
elseif menu_count==2 then elseif menu_count==2 then
text("PULSA BOTÓ PER A ESQUERRA", 16, 24, 13) -- text("PULSA BOTÓ PER A ESQUERRA", 16, 24, 13)
arc_textB("PULSA BOTÓ PER A ESQUERRA", 16*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 3 menu_count = 3
@@ -530,7 +539,8 @@ function update_redefine_pad_menu()
config.key("keleft", btnLeft) config.key("keleft", btnLeft)
end end
elseif menu_count==3 then elseif menu_count==3 then
text("PULSA BOTÓ PER A DRETA", 22, 24, 13) -- text("PULSA BOTÓ PER A DRETA", 22, 24, 13)
arc_textB("PULSA BOTÓ PER A DRETA", 22*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 4 menu_count = 4
@@ -538,7 +548,8 @@ function update_redefine_pad_menu()
config.key("btnright", btnRight) config.key("btnright", btnRight)
end end
elseif menu_count==4 then elseif menu_count==4 then
text("PULSA BOTÓ PER A BOTAR", 22, 24, 13) -- text("PULSA BOTÓ PER A BOTAR", 22, 24, 13)
arc_textB("PULSA BOTÓ PER A BOTAR", 22*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 5 menu_count = 5
@@ -546,7 +557,8 @@ function update_redefine_pad_menu()
config.key("btnjump", btnJump) config.key("btnjump", btnJump)
end end
elseif menu_count==5 then elseif menu_count==5 then
text("PULSA BOTÓ PER A DISPAR", 20, 24, 13) -- text("PULSA BOTÓ PER A DISPAR", 20, 24, 13)
arc_textB("PULSA BOTÓ PER A DISPAR", 20*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 6 menu_count = 6
@@ -554,7 +566,8 @@ function update_redefine_pad_menu()
config.key("btnshoot", btnShoot) config.key("btnshoot", btnShoot)
end end
elseif menu_count==6 then elseif menu_count==6 then
text("PULSA BOTÓ PER A GPS ARRERE", 14, 24, 13) -- text("PULSA BOTÓ PER A GPS ARRERE", 14, 24, 13)
arc_textB("PULSA BOTÓ PER A GPS ARRERE", 14*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 7 menu_count = 7
@@ -562,7 +575,8 @@ function update_redefine_pad_menu()
config.key("btncycle1", btnCycle1) config.key("btncycle1", btnCycle1)
end end
elseif menu_count==7 then elseif menu_count==7 then
text("PULSA BOTÓ PER A GPS AVANT", 14, 24, 13) -- text("PULSA BOTÓ PER A GPS AVANT", 14, 24, 13)
arc_textB("PULSA BOTÓ PER A GPS AVANT", 14*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 8 menu_count = 8
@@ -570,7 +584,8 @@ function update_redefine_pad_menu()
config.key("btncycle2", btnCycle2) config.key("btncycle2", btnCycle2)
end end
elseif menu_count==8 then elseif menu_count==8 then
text("PULSA BOTÓ PER A PAUSA", 22, 24, 13) -- text("PULSA BOTÓ PER A PAUSA", 22, 24, 13)
arc_textB("PULSA BOTÓ PER A PAUSA", 22*o2aX, 24*o2aX, 13)
local btn = pad.press(); local btn = pad.press();
if btn ~= -1 then if btn ~= -1 then
menu_count = 0 menu_count = 0