mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Moving VCTRL related calls and adding buttons for name entry screen
This commit is contained in:
@@ -38,10 +38,12 @@ end
|
||||
|
||||
function TrainingScene:render()
|
||||
self.game:draw(self.paused)
|
||||
VCTRL.draw()
|
||||
end
|
||||
|
||||
function TrainingScene:onInputPress(e)
|
||||
if (self.game.game_over or self.game.completed) and (e.input == "menu_decide" or e.input == "menu_back" or e.input == "rotate_right") and self.game.game_over_frames > 50 then
|
||||
if e.type == "touch" then VCTRL.press(e.x, e.y, e.id)
|
||||
elseif (self.game.game_over or self.game.completed) and (e.input == "menu_decide" or e.input == "menu_back" or e.input == "rotate_right") and self.game.game_over_frames > 50 then
|
||||
SCENE = TitleScene()
|
||||
elseif (e.input == "menu_back") then
|
||||
SCENE = TitleScene()
|
||||
@@ -51,7 +53,8 @@ function TrainingScene:onInputPress(e)
|
||||
end
|
||||
|
||||
function TrainingScene:onInputRelease(e)
|
||||
if e.input and string.sub(e.input, 1, 5) ~= "menu_" then
|
||||
if e.type == "touch" then VCTRL.release(e.id)
|
||||
elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then
|
||||
self.inputs[e.input] = false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user