Dynamic UI Button

Is there a way to create a GUI Button dynamically?

I saw there is a way to clone a button that exist in this example: https://defold.com/examples/gui/button/

Should I create a root invisible button or something and then clone it?

Other question, Is there a way to make an image button? or should I do that manually with X.Y. Input triggers?

Thanks in advance!

Yes, this is a good approach.

You can assign any image to a GUI box node and use gui.pick_node() to detect clicks on the node. Or do you mean something else?

Yeah this will do the job perfectly, thanks for the info, will post the code sample here when I’m done.