This commit is contained in:
SweetSea-ButImNotSweet
2024-05-21 20:07:53 +07:00
parent 7c39c1ada8
commit 5cf9deb9eb
7 changed files with 149 additions and 61 deletions

View File

@@ -94,15 +94,29 @@ end
function TitleScene:onInputPress(e)
if e.type == "touch" then
local selecting = math.floor((e.y - 198) / 20)
if (e.x >= 20 and e.x <= 260) and (selecting > 0 and selecting <= #main_menu_screens) then
if
(e.x >= 20 and e.x <= 260) and
(selecting > 0 and selecting <= #main_menu_screens)
then
if self.main_menu_state ~= selecting then
self.main_menu_state = selecting
else
VCTRL.toggle(true)
SCENE = main_menu_screens[selecting]()
end
elseif e.x >= 14 and e.y >= 40 and e.x <= 274 and e.y <= 170 then
elseif
e.x >= 14 and
e.y >= 40 and
e.x <= 274 and
e.y <= 160
then
if e.x >= 137 then -- Right
table.remove(self.code, 8)
table.insert(self.code, 1, 1)
else -- Left
table.remove(self.code, 8)
table.insert(self.code, 1, -1)
end
end
else
if e.input == "menu_decide" or e.input == "rotate_left" or e.scancode == "return" then