Navigate to the Pause_Inventory Event Graph. While Context Sensitive is off, bring in the Get Array Item from the Actions window by navigating to Class | Field Player:
Once done, connect the Target pin of Array Item to GET so that you can get every item that is sent to that array once we populate the array in the Items Blueprint:
Now that we have the array of items in the player's inventory, we will now loop through each element, and create an item from every element in the array. To do this, create a ForEachLoop by navigating to Utilities | Array. Link Array Item from your arrayItem variable to the Array tab in the ForEachLoop. Then, have SET Inventory Screen activate the ForEachLoop:
Just like what we did when populating the buttons for the shop, we would want this for
loop to be responsible for adding buttons from the Items Widget Blueprint. So, in the body of the for
loop, we need to create the Item widget by first navigating to User Interface | Create Widget...