How to recreate same widget but with different options


I want to create widget with multiple buttons that creates same widget but with other options.
For example when i press button “Get Access to Security Cameras” I want all buttons to change their “Get Access to camera number such and such”. I don’t think i need to create hundreds of different widgets, so i ask for tip.

You will likely need to create a widget for the button type, which would have parameters for what text to display, and what to do when pressed.

Then the widget would have parameters for what buttons to display.

“Parameters” in this context means that you make some variables in the widget blueprint and set them to Expose on Spawn. Then when you use the Create Widget node, those variables will appear so that you can set them.

For instance, if you made a parameter that was an Integer and called it “Number of light switches”, then On Construct in the widget you might have a For Loop which creates a button for the length of that integer (e.g. if it was 5, you get 5 buttons.)

yes, i thought about that, thanks