Linear Slider - Prevent value jumping to mouse click point
-
I've drawn myself a modwheel in laf using drawLinearslider but the behaviour isn't right as wherever you click the mouse on the slider the value jumps to that point. I want behaviour like a rotary knob, click and drag to change value... Any ideas?
-
@DanH It shouldn't be the case if the slider mode is set to
knob -
@ustk yeah but then the laf doesn't work....
-
@DanH why is that? In knob mode you should be able to draw anything, like faking a vertical slider
-
@ustk that's what I thought too

-
@DanH
drawRotarySlider -
@d-healey @ustk oh hang on, I wasn't doing both, just one or the other

-
if (obj.style == int) { do laf } if (obj.style == int) { do another laf } -
Yes, it's a feature not a bug of the linear slider style to pick up the value when you click on it. If that is not active and you have some kind of mixer UI, then it feels like a plugin from 1996 if you need to drag it to set it to the current position.
The proposed solution is correct: use a knob and then the
drawRotaryKnob()function - even if your modwheel looks like a slider you want it to behave like a knob, so knob it is.