From d150205535219eba8cb111ea51b1b02f74fbfe62 Mon Sep 17 00:00:00 2001 From: jill Date: Sun, 19 Sep 2021 22:22:22 +0300 Subject: [PATCH] change parameter text style --- src/slider.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/slider.lua b/src/slider.lua index 9f70af6..9784186 100644 --- a/src/slider.lua +++ b/src/slider.lua @@ -83,7 +83,8 @@ function self.createSliders() max = v.max, default = v.default, name = ease1.name .. 'param1' .. i, - displayname = 'Parameter ' .. v.name + topdisplayname = 'Parameter', + displayname = v.name }) end end @@ -97,7 +98,8 @@ function self.createSliders() max = v.max, default = v.default, name = ease2.name .. 'param2' .. i, - displayname = 'Parameter ' .. v.name + topdisplayname = 'Parameter', + displayname = v.name }) end end @@ -168,6 +170,15 @@ function self.render() love.graphics.printf(v.displayname, v.x + margin * 2 - ssize * 6, v.y - ssize, ssize * 12, 'center') + if v.topdisplayname then + love.graphics.setColor(0.4, 0.4, 0.55, 1) + love.graphics.push() + love.graphics.translate(v.x, v.y - ssize * 1.4) + love.graphics.scale(0.75, 0.75) + love.graphics.printf(v.topdisplayname, -ssize * 6, 0, ssize * 12, 'center') + love.graphics.pop() + end + if dragging then v.value = ((mx - (x + 1)) / (w - 2)) * (v.max - v.min) + v.min if v.name == 'mix' then graph.touchtimer = 1 end -- sorry !!!