mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user