From 1c0b73987d8af61efbd4f39c7aee48f2ad88cc10 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Thu, 9 Dec 2021 21:48:39 -0500 Subject: [PATCH] Rearrange sliders on the game settings menu --- scene/game_config.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scene/game_config.lua b/scene/game_config.lua index c8a2fb7..2276ad6 100644 --- a/scene/game_config.lua +++ b/scene/game_config.lua @@ -34,8 +34,8 @@ function ConfigScene:new() state = "Changing game settings", }) - self.sfxSlider = newSlider(165, 400, 225, config.sfx_volume * 100, 0, 100, function(v) config.sfx_volume = v / 100 end, {width=20, knob="circle", track="roundrect"}) - self.bgmSlider = newSlider(465, 400, 225, config.bgm_volume * 100, 0, 100, function(v) config.bgm_volume = v / 100 end, {width=20, knob="circle", track="roundrect"}) + self.sfxSlider = newSlider(165, 420, 225, config.sfx_volume * 100, 0, 100, function(v) config.sfx_volume = v / 100 end, {width=20, knob="circle", track="roundrect"}) + self.bgmSlider = newSlider(465, 420, 225, config.bgm_volume * 100, 0, 100, function(v) config.bgm_volume = v / 100 end, {width=20, knob="circle", track="roundrect"}) end function ConfigScene:update() @@ -59,7 +59,7 @@ function ConfigScene:render() if not ConfigScene.options[self.highlight][3] then love.graphics.rectangle("fill", 25, 98 + self.highlight * 20, 170, 22) else - love.graphics.rectangle("fill", 65 + (1+self.highlight-#self.options) * 300, 342, 215, 33) + love.graphics.rectangle("fill", 65 + (1+self.highlight-#self.options) * 300, 362, 215, 33) end love.graphics.setFont(font_3x5_2) @@ -76,8 +76,8 @@ function ConfigScene:render() love.graphics.setColor(1, 1, 1, 1) love.graphics.setFont(font_3x5_3) - love.graphics.print("SFX Volume: " .. math.floor(self.sfxSlider:getValue()) .. "%", 75, 345) - love.graphics.print("BGM Volume: " .. math.floor(self.bgmSlider:getValue()) .. "%", 375, 345) + love.graphics.print("SFX Volume: " .. math.floor(self.sfxSlider:getValue()) .. "%", 75, 365) + love.graphics.print("BGM Volume: " .. math.floor(self.bgmSlider:getValue()) .. "%", 375, 365) love.graphics.setColor(1, 1, 1, 0.75) self.sfxSlider:draw()