I refined your script a bit…
Var
btn1,btn2,btn3,btn4,btn5,btn6,btn7,btn8 : Widget
pnl : Widget
btn1Caps : string array = ["Drive", "Drive", "Drive", "Drive"]
btn2Caps : string array = ["Chorus", "Filter", "Chorus", "Chorus"]
btn3Caps : string array = ["Octave", "Ramp Synth", "Reverb", "Reverb"]
btn4Caps : string array = ["Fuzz", "Fuzz", "Bass Cut", "Bass Cut"]
btn5Caps : string array = ["Synth", "Rock Bass", "Rock Bass", "Rock Bass"]
btn6Caps : string array = ["Delay", "Delay", "Delay", "Delay"]
btn7Caps : string array = ["Sustain", "Sustain", "Sustain", "Sustain"]
btn8Caps : string array = ["Tuner", "Tuner", "Tuner", "Tuner"]
function setAllWidgets(rsVariation : integer)
SetWidgetLabel(btn1, btn1Caps[rsVariation])
SetWidgetLabel(btn2, btn2Caps[rsVariation])
SetWidgetLabel(btn3, btn3Caps[rsVariation])
SetWidgetLabel(btn4, btn4Caps[rsVariation])
SetWidgetLabel(btn5, btn5Caps[rsVariation])
SetWidgetLabel(btn6, btn6Caps[rsVariation])
SetWidgetLabel(btn7, btn7Caps[rsVariation])
SetWidgetLabel(btn8, btn8Caps[rsVariation])
Select
rsVariation == 0 do
pnl.SetWidgetFillColor(RGBToColor(0, 0, 0.8, 0.5))
rsVariation == 1 do
pnl.SetWidgetFillColor(RGBToColor(0.8, 0, 0, 0.5))
rsVariation == 2 do
pnl.SetWidgetFillColor(RGBToColor(0, 0.8, 0, 0.5))
rsVariation == 3 do
pnl.SetWidgetFillColor(RGBToColor(0.5, 0.5, 0, 0.5))
end
End
On Variation(oldVariation : integer, newVariation : integer)
setAllWidgets(GetCurrentVariation())
End
On Activate
setAllWidgets(GetCurrentVariation())
End
Assuming that your widgets were “buttons” as the handles implied, i used 8 LED-buttons, where i set them to “Custom Caption” and left the textbox blank, also set them all to “hide temporary values”… so i couldn’t reproduce wether the effect of “the widgets changing back to the saved state” nor any flashing text. Maybe i missed something?
Have a look at the gig file and if you encounter those issues, please tell me the exact steps how to reproduce that.
change caption on Variation.gig (126.9 KB)