I’m trying to link one set of radio buttons to another set of radio buttons. Goal: click a button in one set, to engage a button in the other set.
In the amp panel, the ampButtons are in a Radio Group and enable the linked plugin and disable all the others. The ampViewButtons open/close the linked plugin editor and are configured the same way.
They can’t all be in the same Radio Group since I want two buttons engaged simultaneously.
If I could, I’d put the two sets into a Widget Link AND the Radio group, but that’s not allowed. So I turn to scripting.
In my script, I’ve declared:
var ampViewButtons: Widget Array = [
BUTTON_VIEW_WONG,
BUTTON_VIEW_GOJIRA,
BUTTON_VIEW_RABEA
]
var ampButtons: Widget Array = [
BUTTON_AMP_WONG,
BUTTON_AMP_GOJIRA,
BUTTON_AMP_RABEA
]
I want to use the multi-Widget form of On WidgetValueChanged:
On WidgetValueChanged(w: Widget, index: integer, newValue: double) from <Widget name>, <Widget name>
The docs show a slightly different function signature:
On WidgetValueChanged ([w : Widget, index : integer,] newValue : double) from SomeWidget [,SomeWidget]*
I’m not able to find the right syntax to pass the ampButtons array to the WidgetValueChanged function. I’m also not able to use the w object in any way. I can get the index value.
Is there any better examples of Array usage? Can anyone share experience in this? Thanks!