Bump to v0.3-beta5.1, release tomorrow

This commit is contained in:
Ishaan Bhardwaj 2021-05-20 23:25:24 -04:00
parent f5121b62e5
commit 99d3732d00
5 changed files with 11 additions and 8 deletions

View File

@ -31,7 +31,7 @@ function initConfig()
end end
if not config.input then if not config.input then
scene = KeyConfigScene() scene = InputConfigScene()
else else
if config.current_mode then current_mode = config.current_mode end if config.current_mode then current_mode = config.current_mode end
if config.current_ruleset then current_ruleset = config.current_ruleset end if config.current_ruleset then current_ruleset = config.current_ruleset end

View File

@ -1 +1 @@
version = "v0.3-beta5" version = "v0.3-beta5.1"

View File

@ -29,7 +29,7 @@ function ConfigScene:render()
love.graphics.print("INPUT CONFIG", 80, 40) love.graphics.print("INPUT CONFIG", 80, 40)
love.graphics.setFont(font_3x5_2) love.graphics.setFont(font_3x5_2)
love.graphics.print("Which controls do you want to change?", 80, 90) love.graphics.print("Which controls do you want to configure?", 80, 90)
love.graphics.setColor(1, 1, 1, 0.5) 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, 200, 33)
@ -56,7 +56,9 @@ function ConfigScene:onInputPress(e)
elseif e.input == "down" or e.scancode == "down" then elseif e.input == "down" or e.scancode == "down" then
self:changeOption(1) self:changeOption(1)
playSE("cursor") playSE("cursor")
elseif e.input == "menu_back" or e.scancode == "backspace" or e.scancode == "delete" then elseif config.input and (
e.input == "menu_back" or e.scancode == "backspace" or e.scancode == "delete"
) then
scene = SettingsScene() scene = SettingsScene()
end end
end end

View File

@ -69,8 +69,7 @@ end
function KeyConfigScene:onInputPress(e) function KeyConfigScene:onInputPress(e)
if e.type == "key" then if e.type == "key" then
-- function keys, escape, and tab are reserved and can't be remapped -- function keys, escape, and tab are reserved and can't be remapped
if e.scancode == "escape" and config.input then if e.scancode == "escape" then
-- cancel only if there was an input config already
scene = InputConfigScene() scene = InputConfigScene()
elseif self.input_state > table.getn(configurable_inputs) then elseif self.input_state > table.getn(configurable_inputs) then
if e.scancode == "return" then if e.scancode == "return" then

View File

@ -82,9 +82,11 @@ function StickConfigScene:onInputPress(e)
elseif self.input_state > table.getn(configurable_inputs) then elseif self.input_state > table.getn(configurable_inputs) then
if e.scancode == "return" then if e.scancode == "return" then
-- save new input, then load next scene -- save new input, then load next scene
config.input.joysticks = self.new_input local had_config = config.input ~= nil
if not config.input then config.input = {} end
config.input.joysticks = self.new_input
saveConfig() saveConfig()
scene = InputConfigScene() scene = had_config and InputConfigScene() or TitleScene()
elseif e.scancode == "delete" or e.scancode == "backspace" then elseif e.scancode == "delete" or e.scancode == "backspace" then
-- retry -- retry
self.input_state = 1 self.input_state = 1