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

@@ -7,6 +7,9 @@ TouchConfigScene.title = "Touchscreen config\n(you can tap anywhere on touch scr
2. Add behaviors
]]
local focusingButton
local selectingButton
local buttonList = {
select_button = BUTTON.new{
text = "Select key\n[Rotate right 2]",
@@ -56,6 +59,9 @@ local buttonList = {
}
function TouchConfigScene:new()
VCTRL.toggle(true)
focusingButton = false
selectingButton = nil
-- TODO
end
function TouchConfigScene:update()
@@ -78,13 +84,13 @@ end
function TouchConfigScene:onInputPress(e)
if e.input == 'menu_back' then SCENE = InputConfigScene() end
if e.type == "mouse" or e.type == "touch" then
BUTTON.press(buttonList, e.x, e.y)
BUTTON.press(buttonList, e.x, e.y, e.type == "touch")
end
end
---@param e SCENE_onInput
function TouchConfigScene:onInputRelease(e)
if e.type == "mouse" or e.type == "touch" then
BUTTON.release(buttonList, e.x, e.y)
BUTTON.release(buttonList, e.x, e.y, e.type == "touch")
end
end