If you mash @huban’s dyn panel and repeater ideas together you’ll find that it’s not very labour intensive in the long run. Definitely a bit of upfront cost but once it’s done it’s largely unchanged (unless your icons change). I have two others among the many available approaches huban mentioned.
- Create an icon with images, shapes, whatevs
- Create a dynamic panel around the icon
- Make a state for every icon, and give the state a meaningful name - like the name of the icon for example
- Make this dyn panel a Component
- Create a repeater from this component instance - remove all but one row and all but one column, break the autogenerated connections
- On the Interactions for your repeater, under Item Loaded add: Set Panel State (Select your dyn panel in your component as Target, and set State to Value, set Value to “[[Item.Column1]]” - or whatever you called your column)
- In the value for Column1 row 1, enter a value matching a dyn panel name.
Then you can use this “icon library” component all over the place and edit the repeater value to whatever icon you want to use.
In case you already have a repeater in use (no nested repeaters are allowed), or for whatever reason the repeater method sounds onerous, another option is to follow the steps above up to 4, and then instead of making the repeater, you group that icon library component by itself.
Use the name for the icon you would’ve put in the repeater as the group name and then on the group interactions, On Loaded add: Set Panel State (Select your dyn panel in your component as Target, and set State to Value, set Value to “[[This.name]]”). This second method does have the downside that the correct icon isn’t displayed in the editor, but it will appear correctly on the prototype player.
I’ve included both of these examples in this attachment: icon library concept.rp (89.9 KB)