I made a button that set the scroll of a panel to different state / position.
I mean :
-1st tap : scroll = 0, what became scroll:false in the panel's prop (except in the gif down below)
-2nd tap : scroll = 100
-3nd tap : scroll = 200
And if i tap again the button, we're back to 0, then 100...
To get this, i have a variable widget and this in the button's script
You could set the panel's scroll property to VAR{scroll, false} and the button's script as follows:
if (value == 1) {
locals.pressTimeout = setTimeout(()=>{
// do something
var scrollVar = getVar('panel_id', 'scroll')
setVar('panel_id', 'scroll', !scrollVar)
}, 500) // after 0.5s
// + any other action that should occur uppon regular press
} else {
// cancel if button is released (assuming mode == push)
clearTimeout(locals.pressTimeout)
}
Second question : is it possible to modify the scrolling "sensitivity" ?...
Ok, thank you very much ! I've just tried it and it's super interesting. A lot to learn in the code you just gave me Coool
Question : what does mean the final !scrovall in the setVar() ??
Well, now i don't think this is going to be handy for me this way. Cause i deal with a little bit more than three knobs...
Actually, i made this, and i love scrolling from one controller to the other...
The only problem is that sometimes, as i trigger some fader or knob... wooops... i get scrolling... a bit hard to deal with... And that's why i'd like to hold the scroll value as long as i need.
Setting scroll prop to false bring me to the top image, and i didn't find anyway to stay at the same level...
I know i could use tabs... visibility... but scrolling is really cool, so...