What's new

Save last knob position

Please, help-me!
What is wrong?

I need to do the Volume knob after reloaded, remain in the same place after the "move" button has pressed. Is possible?
Because every time a click on (Apply button script editor) or reload the instrument, the volume position in the panel go back to 0, 0.
Do is possible to change this?

thanks!!!
on init
make_perfview
set_ui_height (200)
declare ui_knob $volume (0, 1000000, 0)
move_control ($volume, 0,0)
make_persistent ($volume)
declare ui_switch $move
make_persistent ($move)
move_control_px ($move, 50,25)

end on

on ui_control ($move)
if ($move = 1)
move_control_px ($volume, 100,100)
else
move_control ($volume, 0, 0)
end if
end on

 
You should be using hiding instead of moving to 0, 0. You need to do this in "on persistence_changed" callback too.
 
Please, help-me!
What is wrong?

I need to do the Volume knob after reloaded, remain in the same place after the "move" button has pressed. Is possible?
Because every time a click on (Apply button script editor) or reload the instrument, the volume position in the panel go back to 0, 0.
Do is possible to change this?

thanks!!!
You should be using hiding instead of moving to 0, 0. You need to do this in "on persistence_changed" callback too.
Thank you so much Dragon!!!!!
 
Top Bottom