Is there any way to change which parameters are displayed? I’m working on the premiss that has to be done whilst he program is running not at setup because I want to be able to display a varying set of pairs of parameters according to the users choices. The user selects from a set of buttons.
I have not played with clearparameters() but I think that is what you need.
Thanks. It certainly clears what’s there but when another parameter is added the slider cannot be changed because I’m guessing that the clearparameters() in the frame loop takes over the control.
@mattbastin you’ll want to call clearParameters() only once, in response to some event (such as a scene change). Having it called every frame will cause issues, as you note.
I would simply create something like:
function draw()
if parametersScene == 1 then
if not alreadySet then
parameter(whatever,1,10,1)
parameter(whatever2,1,20,1)
alreadySet = true
end
elseif parametersScene == 2 then
if not alreadySet then
parameter(whatever3,1,100,1)
parameter(whatever4,1,3,1)
alreadySet = true
end
end
if newParameters then
parametersScene = 2
alreadySet = false
end
end
So ist can be used every frame