From ad676116018c4a618e97014a897d381f1ab27e01 Mon Sep 17 00:00:00 2001 From: jill Date: Sat, 18 Sep 2021 03:54:51 +0300 Subject: [PATCH] precise-r slider value setting --- slider.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slider.lua b/slider.lua index 69da661..2ef7200 100644 --- a/slider.lua +++ b/slider.lua @@ -145,7 +145,7 @@ function self.render() love.graphics.printf(v.displayname, v.x + margin * 2 - ssize * 6, v.y - 8, ssize * 12, 'center') if dragging then - v.value = ((mx - x) / w) * (v.max - v.min) + v.min + v.value = ((mx - (x + 1)) / (w - 2)) * (v.max - v.min) + v.min if v.name == 'mix' then graph.touchtimer = 1 end -- sorry !!! createUI() end