Fix Android code

This commit is contained in:
SweetSea-ButImNotSweet
2024-05-26 14:51:25 +07:00
parent ca7ce851d9
commit 088aeaf60d
2 changed files with 8 additions and 9 deletions

View File

@@ -94,13 +94,11 @@ function ConfigScene:render()
drawText("", 80, 70, 1000)
drawBigText("7 9 3 3 8 7 3 2", 80, 100, 1000)
drawText(
[[
2 - Up 1 - Rotate left 5 - Confirm selection
8 - Right 3 - Rotate right 0 - Back
4 - Left 7 - Rotate left 2
6 - Down 9 - Rotate right 2
]],
80, 350, 1000)
"2 - Up 1 - Rotate left 5 - Confirm selection\n"..
"8 - Right 3 - Rotate right 0 - Back\n"..
"4 - Left 7 - Rotate left 2..\n"..
"6 - Down 9 - Rotate right 2", 80, 350, 1000
)
elseif self.first_time then
drawText("Thanks for playing Tromi!", 80, 40, 1000)
drawText("Please begin by configuring your controls:", 80, 70, 1000)
@@ -136,7 +134,7 @@ local function checkSecretCodeInput(self, key)
if secret_code_used then return end
if key:sub(1, 2) == "kp" then
table.insert(secret_code_input, key:sub(3,3))
elseif key:find("0-9") == 1 then
elseif key:find("[0-9]") == 1 then
table.insert(secret_code_input, key)
else
secret_code_input = {} -- Reset
@@ -176,7 +174,7 @@ function ConfigScene:onInputPress(e)
) then
SCENE = TitleScene()
end
checkSecretCodeInput(self, e.key)
checkSecretCodeInput(self, e.key or "")
end
function ConfigScene:onInputRelease(e)
if e.type == "touch" or e.type == "mouse" then