Widget Visibility

Hi, everyone! So, I have a button widget blueprint that takes its data from datatable. Cost, texture etc. I use the same button for 57 different places. What I want to do is that set their visibility invidiually depending on some situations. How can I do that?

329373-untitled1.png

This is how it looks on the editor and how it looks on the game

What I want to do is that set their
visibility invidiually depending on
some situations.

The approach would depend on the situations. More details needed.


Generally it’s just Get WidgetSet Visibility

So, what you’re gonna want to do is, in the area that you’re adding these children to the main panel, you’re going to run the checks. So for like, only swords, you’ll need to make sure that you’re passing a variable declaring the weapon ‘Type’ from the dataTable, into an exposed variable when you’re creating the buttons.

e.g.
OnOpenInventory > get InventoryListNames > foreach getdatatable > getRowName - WeaponType = (sword)? > if true add to currentbuttons > add child to panel

That should roughly only load the sword items and will also set all of those to an array which you could use to go as far as to organize them into power, price, rarity, etc.