Hello, I’m trying to create a inventory that will show all the letters in the game that the player has picked up. At the start of the game before the player has picked up any letters, I want the inventory to fade out or hide all the letters in the inventory widget, and as the player collects them, whey can be viewable in the inventory. I don’t know how to do that and I need help.
Usually, you would use a child widget (Subwidget) for the letters and fill a uniform grid panel (and maybe wrap that with a scrollbox). This would allow you to fill the grid based on which letters the user has in his inventory.
(Create Widget select your subwidget (Letter) as the class and ad it as a child (make sure the row and column are correct))
If you know the user will have 9 Letters (like in your image) you could just bind every letter (Button) visibility.
For the Fade just create a simple animation and animate the render opacity of the whole canvas (or all the letters).
So click back button would play the animation and after the animation, duration remove “widget from parent” or Hide(collapse) it.
The first solution is more work and more complex but can scale.
Hope that helps.