mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
TEST
This commit is contained in:
@@ -93,6 +93,26 @@ end
|
||||
|
||||
function TitleScene:onInputPress(e)
|
||||
if e.type == "touch" then
|
||||
|
||||
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
|
||||
|
||||
function TitleScene:onInputRelease(e)
|
||||
if e.type ~= "touch" then return end
|
||||
local selecting = math.floor((e.y - 198) / 20)
|
||||
if
|
||||
(e.x >= 20 and e.x <= 260) and
|
||||
@@ -118,21 +138,6 @@ function TitleScene:onInputPress(e)
|
||||
table.insert(self.code, 1, -1)
|
||||
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
|
||||
|
||||
return TitleScene
|
||||
|
||||
Reference in New Issue
Block a user