Revert "Separate in-game bindings from menu bindings"

This reverts commit 0fce4b632f.
This commit caused issue #41. Will resolve ASAP.
This commit is contained in:
Ishaan Bhardwaj
2021-10-21 20:52:42 -04:00
parent 0fce4b632f
commit 7495c4ad04
12 changed files with 44 additions and 140 deletions

View File

@@ -5,6 +5,8 @@ KeyConfigScene.title = "Key Config"
require 'load.save'
local configurable_inputs = {
"menu_decide",
"menu_back",
"left",
"right",
"up",
@@ -73,15 +75,10 @@ function KeyConfigScene:onInputPress(e)
if e.scancode == "return" then
-- save new input, then load next scene
local had_config = config.input ~= nil
if not had_config then
config.input = {}
config.input.keys = {}
end
for k, v in pairs(self.new_input) do
config.input.keys[k] = v
end
if not config.input then config.input = {} end
config.input.keys = self.new_input
saveConfig()
scene = had_config and InputConfigScene() or MenuConfigScene()
scene = had_config and InputConfigScene() or TitleScene()
elseif e.scancode == "delete" or e.scancode == "backspace" then
-- retry
self.input_state = 1