Adding touch screen configuration scene (placeholder)

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-04-20 22:33:55 +07:00
parent 1773a6aa67
commit 66aae1342d
3 changed files with 32 additions and 5 deletions

View File

@@ -3,7 +3,8 @@ ConfigScene.title = "Input Config"
local menu_screens = {
KeyConfigScene,
StickConfigScene
StickConfigScene,
TouchConfigScene
}
function ConfigScene:new(first_time)
@@ -27,11 +28,11 @@ function ConfigScene:render()
end
love.graphics.setColor(1, 1, 1, 0.5)
love.graphics.rectangle("fill", 75, 118 + 50 * self.menu_state, 200, 33)
love.graphics.rectangle("fill", 75, 118 + 50 * self.menu_state, 300, 35)
love.graphics.setColor(1, 1, 1, 1)
for i, screen in pairs(menu_screens) do
drawText(screen.title, 80, 120 + 50 * i, 200, "left")
drawText(screen.title, 80, 120 + 50 * i, 300, "left")
end
end
@@ -47,7 +48,7 @@ function ConfigScene:onInputPress(e)
self:changeOption(-1)
elseif e.input == "down" or e.scancode == "down" then
self:changeOption(1)
elseif SETTINGS.input and (
elseif not SETTINGS.firstTime and (
e.input == "menu_back" or e.input == "rotate_right" or e.scancode == "backspace" or e.scancode == "delete"
) then
SCENE = TitleScene()