How to make a reverse "switch on enum" macro?

Risking sounding like a broken record… :smiley:


The buttons should be standalone, configurable widgets dispatching their assigned data:

image

The parent container can fetch something from a Dictionary:

But, at this point, you do not even need an Enumerator or a Dictionary - each button may simply hold & dispatch an int Index. You assign the data to the button itself.


What’s more, you can make the data Instance Editable and even use the autobind:

Although, this is not always convenient, depends on the scenario. Here, clicking a button produces an index.