Lock / Unlock

Based on this script, i want to switch 2 panel each containing a Knob volume for control a reverb send level and text label which return me the value of the reverb send.
For switching, not use a toggle switch but 2 red led.
If I click on red led 1, it’s the panel for piano reverb. Led 1 is lit, other switched off…
Same thing with led 2, panel synth appears instead of panel piano… led 2 is lit, switch off the led 1 etc… OK, all works fine. :slightly_smiling_face:

Now, it’s only for “graphic vision”.
If i’m on the 1st panel, my red led 1 is on. I can click again on this led 1, it doesn’t affect the panel of course but it switch off the led and I’d like it to stay lit.

If there was a function for that, ex (SetWidgetLockOnPresentation, true or false), it would simplify the code and write something like this :.

On WidgetValueChanged(newValue : double) from Led1
 If newValue == 1.0 then
    HideThem (synthPanel, pianoPanel)
    ResetWidgetValue(Led2)
    SetWidgetLockOnPresentation(Led1, true)
 end
End

Some photos to illustrate my point :

Panel 1 (Reverb Piano)


Panel 2 (Reverb Synth)

Panel 1 (2 successive clicks :upside_down_face:)