(This can apply to all engine versions using UMG)
Hey guys and girls,
I’ve created a widget that is to be used inside a Grid Panel in UMG. So far I have buttons that add this widget to the grid panel during runtgime. Adding the widget is fine and all the data works perfectly as I had designed it (woo!).
Here is a screenshot of what the screen looks like when I have added a couple of CF (Conventional forces) and Mechs:
Here is the logic in the RosterScreen:
And here is the Mech Widget’s logic since you can customise the stats (which works, i just need to sort out my default combo box option).
I know how to save variables to a slot but my problem is I can’t seem to get my head around saving the data of multiple instances of this widget in the Grid Panel.
The Mech and CF widget is instanced and added to the grid panel everytime the +Mech or +CF button is pressed. The data can be independently edited too. It’s just saving all of that which is boggling me.
I would like the player to be able to save the data in each of the instanced/newly generated widgets they add to the Grid Panel and be able to load the last sessions generated widgets including all the data inside those generated widgets.
I’m pretty sure it’s possible and it’s frustrating me to no end on how i can get this working. Anyone able to give me a few pointers?
EDIT: I’ve tried adding widgets to an array and recording their index number. I then copied the way i generated the widgets and tried to save the array and then load the array data whilst using a WhileLoop to add the widgets back in. This didn’t succeed…if that method is a legit answer then I most likely went about it the wrong way…so yeah…I’m still stuck!
Here’s a video of the roster in action as well.
[YouTube][4]