This commit is contained in:
SweetSea-ButImNotSweet
2024-05-13 17:27:51 +07:00
parent 940e17eff7
commit f5584b5df7
6 changed files with 66 additions and 38 deletions

View File

@@ -21,6 +21,7 @@ function TitleScene:new()
self.main_menu_state = 1
PENTO_MODE = false
self.code = {0,0,0,0,0,0,0,0}
VCTRL.toggle(false)
end
function TitleScene:update()
@@ -63,7 +64,7 @@ function TitleScene:render()
drawBigText('Tromi', 30, 180, 120, "left")
drawText('version 2', 110, 193, 120, "left")
self:drawCredits(300, 40)
drawText("mycophobia.org", 20, 405, 1000)
drawText(tostring(self.main_menu_state), 20, 405, 1000)
drawText("Based on Cambridge - t-sp.in/cambridge", 20, 420, 1000)
drawText("Music for Tromi by Jerry Martin, all rights reserved - jerrymartinmusic.com", 20, 435, 1000)
drawText("Game backgrounds by Pixabay users Joe_hackney, yokim, Favorisxp, Any_Ann, VisualSkyFX ", 20, 450, 1000)
@@ -92,18 +93,30 @@ function TitleScene:changeOption(rel)
end
function TitleScene:onInputPress(e)
if e.input == "menu_decide" or e.input == "rotate_left" or e.scancode == "return" then
SCENE = main_menu_screens[self.main_menu_state]()
elseif e.input == "up" or e.scancode == "up" then
self:changeOption(-1)
elseif e.input == "down" or e.scancode == "down" then
self:changeOption(1)
elseif e.input == "left" or e.scancode == "left" then
table.remove(self.code, 8)
table.insert(self.code, 1, -1)
elseif e.input == "right" or e.scancode == "right" then
table.remove(self.code, 8)
table.insert(self.code, 1, 1)
if e.type == "touch" then
local selecting = math.floor((e.y - 198) / 20)
if 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
end
else
if e.input == "menu_decide" or e.input == "rotate_left" or e.scancode == "return" then
SCENE = main_menu_screens[self.main_menu_state]()
elseif e.input == "up" or e.scancode == "up" then
self:changeOption(-1)
elseif e.input == "down" or e.scancode == "down" then
self:changeOption(1)
elseif e.input == "left" or e.scancode == "left" then
table.remove(self.code, 8)
table.insert(self.code, 1, -1)
elseif e.input == "right" or e.scancode == "right" then
table.remove(self.code, 8)
table.insert(self.code, 1, 1)
end
end
end