diff --git a/scene/game_config.lua b/scene/game_config.lua index ebc995d..e20ae32 100644 --- a/scene/game_config.lua +++ b/scene/game_config.lua @@ -100,9 +100,10 @@ function ConfigScene:onInputPress(e) local option = ConfigScene.options[self.highlight] config.gamesettings[option[1]] = Mod1(config.gamesettings[option[1]]-1, #option[4]) else - playSE("cursor") - sld = self[self.options[self.highlight][4]] + local sld = self[self.options[self.highlight][4]] sld.value = math.max(sld.min, math.min(sld.max, (sld:getValue() - 5) / (sld.max - sld.min))) + sld:update() + playSE("cursor") end elseif e.input == "right" or e.scancode == "right" then if not self.options[self.highlight][3] then @@ -110,9 +111,10 @@ function ConfigScene:onInputPress(e) local option = ConfigScene.options[self.highlight] config.gamesettings[option[1]] = Mod1(config.gamesettings[option[1]]+1, #option[4]) else - playSE("cursor") sld = self[self.options[self.highlight][4]] - sld.value = math.max(sld.min, math.min(sld.max, (sld:getValue() + 5) / (sld.max - sld.min)))--math.max(0, (math.floor(sld:getValue())+2)/(sld.max-sld.min)) + sld.value = math.max(sld.min, math.min(sld.max, (sld:getValue() + 5) / (sld.max - sld.min))) + sld:update() + playSE("cursor") end elseif e.input == "menu_back" or e.scancode == "delete" or e.scancode == "backspace" then loadSave()