I already have the wheel, with each section being a button, and I have part of the inventory logic, but I’m having a hard time connecting the two. How can I make it display the item icon and name? All the tutorials I’ve watched have used vertical boxes and lists but I don’t think that’ll work here. Any help is appreciated.
the logic is basically the same, you’d get your inventory Map/Array and loop over the indexs to update the widget.
depending on where your code is the widget can get a Ref to the character/inventory with GetPlayerCharacter or just pass it through a Ref on construct, then bind to some event like OnInventoryChanged
I’m not really sure how I can do that for the radial though. In the tutorial I’m following, he creates a separate widget that is a box that gets added to the vertical box “container” in his main widget, but I don’t have a container and don’t know if or how I can make one. https://www.youtube.com/watch?v=aca_Toxfla8&t=312s&ab_channel=PyroDev
so for a simple version, make an array of type button and manually add your buttons too it, in the button widget have a function for update item data and you can get a button from the array with the index in your loop.
This is what ive got, I assume I’ve done something wrong somehwere because only the text displays, and it displays whatever the last item I picked up is (pretty sure I just have to do on hovered and on unhovered events to fix that?) but I just cannot get the icon to display
your Get node isnt plugged in but looking at your code i see your button/icon are well just that, i had assumed they were widgets themselves so they can handle their own logic.
in you situation all you need to plug in is the index and then in your function you can have a SwitchOnInt so index 0 hooks to button/icon 1 etc.
when a button is clicked it can return its index so you get the correct Array data
where do i plug the get node in? after adding print strings throughout I can see that there’s no problems retrieving the icons but they’re not being added to button image
dont worry about the Get node in your current setup, instead plug the array index into your function UpdateItemData then off that integer use either a switch on int or select node so that index 0 updates button icon 1, index 1 updates button icon 2 etc
yep but obviously each switch pin needs to correspond to only 1 icon, or like i said try a select node, but likely the name needs to be set uniquely for each button as well
ive set it up like this, this is how i assume you meant, what do you mean about the name? if you mean the name being displayed with the icon, I’m not super concerned about that right now, just the icon, even now it still doesn’t show up