Fix various bugs

- Sometimes keyboard suddenly closed while a key is being pressed on mobile (TEST)
- Fix navigation issue in replay scene
- Fix Confirm key is not usable as Restart in 20G Training
This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-06-14 15:20:36 +07:00
parent a5b72ef286
commit 52f0e5323f
4 changed files with 17 additions and 8 deletions

View File

@@ -8,7 +8,11 @@ local buttonList = {
x = 325, y = 385, w = 100, h = 30,
text = CHAR.key.up.." Page up",
codeWhenReleased = function()
scene_self.page = math.max(scene_self.page - 1, 0)
if scene_self.page == 1 then
scene_self.page = 1 + math.floor(#scene_self.replays / scene_self.page_flip)
else
scene_self.page = scene_self.page - 1
end
scene_self.replay_select = 1;
end
},
@@ -16,7 +20,11 @@ local buttonList = {
x = 435, y = 385, w = 100, h = 30,
text = CHAR.key.down.." Page down",
codeWhenReleased = function()
scene_self.page = math.max(scene_self.page - 1, 1+(math.floor(#scene_self.replays / scene_self.page_flip)))
if scene_self.page < 1 + math.floor(#scene_self.replays / scene_self.page_flip) then
scene_self.page = scene_self.page + 1
else
scene_self.page = 1
end
scene_self.replay_select = 1;
end
},