Wednesday, 26 July 2023

How To Tutorial : UMG Wrap box ( graphical part of inventory system )

This has got to be the simplest point of attack to handing the graphical side to an inventory , in a lot of cases things like the scrollable lists are used with widgets that themselves are lists just in a different orientation , this works but is just more complex so why do this to yourself in this modern era of UE5.1+

( why is the thumbnail offset to the left )








Setup the inventory item widget , in the top righthand part of the screen set the size of the widget to custom and make a size



 
Drag in a canvas and a Button




un believably thats it and all you have to do just for starters , you can style the entry from here but this gives you the base thing







in the second widget which is your main widget or hud as I called it drag in a canvas panel as a base
a border which contains the wrap box and a sacrificial button and add the blueprint nodes as below on the on click button event









then finally in the main blueprint create and add the hud widget to the viewport put it on the begin_play node , tack on the show mouse cursor so your mouse is left free to roam and click on the button.

and thats it!, painfully simple to do there's enough there to be dangerous




No comments:

Post a Comment