Moving VCTRL related calls and adding buttons for name entry screen

This commit is contained in:
SweetSea-ButImNotSweet
2024-05-22 19:17:17 +07:00
parent c81b85b9ed
commit 2b916ca2ad
9 changed files with 146 additions and 113 deletions

View File

@@ -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