Dynamically create a UI?

Hi, so I have a working shop that I am happy with. But it takes almost an hour, sometimes longer, to add an item I already modeled to the shop. I am hoping someone knows a better way to do this, like dynamically creating the items?

Here is what I mean:

Each shop item has its own variables for showing the red checkmarks, blue checkmarks, clicking on the widget, showing the price, showing select item buttons after you bought it, etc…

I have to switch out all these variables every time AND add a new system for remembering if you bought something. There are an overwhelming amount of variables.

Sorry if this is a bad question.

Slate UI system which powers UMG and entire editor UI is layout stacking based ui system, so it has single root widget containing other widgets layout other widgets etc., similar to Android UI system or more simple html, you can already see this concept in widget tree in UMG editor. Even you widget is not root widget as game window it self is widget for Slate and it just adds your widget to the tree.

What does that means? it means you your widget can be contained in any other widget and they can be controlled same way as actors on the level… like any other widget you useing. If you look on widget pallete on the bottom you should have “User Created” and it should list all you widget blueprint and you can place that widget you editing.

So create widget for single item and in shop UI widget just add those in and stack them in array, you can even make item widget accept objects or actor varables which will make content of the widget automatically filled. This should make your UI more compact… thats the whole point of object oriented programming

Worked perfectly, thanks :slight_smile: