Controlp5 - Multiple buttons that use one function

Hey there, I’m running into a similar issue:

I have an object that generates buttons with a method, but I want all of those buttons to do the same thing. There is not a finite amount of buttons that could be generated, so I can’t just create a bunch of similar functions with different names to be linked to buttons with different names.

Anyways, I’m a bit confused by your solution, do you mind elaborating on it? Do you perchance have your original code on hand? Any help would be greatly appreciated :slight_smile: