I have a couple of questions about using the Inventory widget:
- How is the implementation for displaying inventory works? I’m asking it because can’t reproduce rendering inventory slots, when a player has picked up items from the ground. An inventory widget is rendered without any issues, but it slots not.
As far as I understood, the basic example just perform the following steps for displaying the character inventory:
- Filled the inventory (once, at the beginning) via calling “Create inventory” function
- When was pressed the “I” key (or invoked somehow the “Trigger window” event), the inventory window widget will be constructed and displayed.
Thus, the questions arises: how and where it is filled, if it was specified as empty? How the inventory windows knew where the get the data and will make a drawing call?
P.S. In my case the Content array has the FItemInfo type, which is a struct, that storing information for each item in inventory (item type, name, icon (as texture 2d) and blueprint class)
- Shall I make the “Update Inventory” function for replacing / re-initializing an inventory widget each time when a player added / removed an item?
- What is the purpose of the custom “Trigger window” event? Just displaying/removing a particular widget (by its name) for the current layout? Maybe some other cases when it could be useful?