Renaming and moving some modules

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-04-19 22:24:22 +07:00
parent 9c8628a014
commit 35edf8fbd6
24 changed files with 261 additions and 290 deletions

View File

@@ -2,7 +2,7 @@ local StickConfigScene = SCENE:extend()
StickConfigScene.title = "Controller Config"
require 'load.save'
require 'settings'
local minos = {'R_d', 'O_d', 'Y_d', 'G_d', 'C_d', 'B_d', 'M_d'}
@@ -59,7 +59,7 @@ function StickConfigScene:render()
end
end
if self.input_state > #configurable_inputs then
drawText("Press enter to confirm, delete/backspace to retry" .. (config.input and ", escape to cancel" or ""), 0, 0, 1000)
drawText("Press enter to confirm, delete/backspace to retry" .. (SETTINGS.input and ", escape to cancel" or ""), 0, 0, 1000)
else
drawText("Press joystick input for " .. input_names[configurable_inputs[self.input_state]] .. ", tab to skip, escape to cancel", 0, 0, 1000)
end
@@ -81,10 +81,9 @@ function StickConfigScene:onInputPress(e)
elseif self.input_state > #configurable_inputs then
if e.scancode == "return" then
-- save new input, then load next scene
local had_config = config.input ~= nil
if not config.input then config.input = {} end
config.input.joysticks = self.new_input
saveConfig()
local had_config = SETTINGS.input ~= nil
if not SETTINGS.input then SETTINGS.input = {} end
SETTINGS.input.joysticks = self.new_input
SCENE = had_config and InputConfigScene() or TitleScene()
elseif e.scancode == "delete" or e.scancode == "backspace" then
-- retry