Hello…
I’m trying to get the focus on a (list of) button(s) inside a umg widget (an inventory widget in this case), so I can use a gamepad/keyboard to “click” it and move up and down inside the list.
Clicking it with a mouse works.
The problem is, the buttons are created dynamically based on the items the player picks up.
So the button is not really inside the inventory widget, but inside another widget (called inventory buttons widget).
I have a button to close some stuff inside the inventory widget, this one I can set focus to.
But I fail at getting the focus to the inventory buttons.
I tried to make an array of all the buttons created and then always set the focus to the last index of that array.
This kinda works in terms that i can set the dotted line to those buttons, but i can’t use the enter key to select them. I guess the focus isn’t really on the buttons, because the dotted line I get through that, fills the whole space horizontaly, but if i click on the button with a mouse, the dotted line is only around the button (because I didnt set it to fill for now, for testing purposes). I guess I’m putting the wrong stuff into the array, for my purpose?
my setup:
the inventory buttons widget
the inventory widget (graph)
the inventory widget (designer)
and the player blueprint, where i want the focus to be set on the buttons, when i open the inventory
I tried to get my head around it for the last couple of days, the last thing I came up with was that array with the created buttons, but I dont know if that goes into the right direction. With this I can sort of highlight the buttons, even use the cursor keys to move up and down the list, but I can’t select them.
So, does someone has any idea of how to get this working? Thanks and have a nice weekend.