Separate in-game bindings from menu bindings

Also preemptive version bump
This commit is contained in:
Ishaan Bhardwaj
2021-10-19 18:35:32 -04:00
parent aa56248e34
commit 0fce4b632f
12 changed files with 140 additions and 44 deletions

View File

@@ -4,6 +4,7 @@ SettingsScene.title = "Settings"
local menu_screens = {
InputConfigScene,
MenuConfigScene,
GameConfigScene,
TuningScene
}
@@ -57,16 +58,16 @@ function SettingsScene:changeOption(rel)
end
function SettingsScene:onInputPress(e)
if e.input == "menu_decide" or e.scancode == "return" then
if e.input == "menu_decide" then
playSE("main_decide")
scene = menu_screens[self.menu_state]()
elseif e.input == "up" or e.scancode == "up" then
elseif e.input == "menu_up" then
self:changeOption(-1)
playSE("cursor")
elseif e.input == "down" or e.scancode == "down" then
elseif e.input == "menu_down" then
self:changeOption(1)
playSE("cursor")
elseif e.input == "menu_back" or e.scancode == "backspace" or e.scancode == "delete" then
elseif e.input == "menu_back" then
scene = TitleScene()
end
end