Now that 4.6 is officially out, along with controller support, I’m curious about how to get it working. I guess this is a tips/tricks/basics thread.
Some stuff I’ve figured out so far:
If you want to focus on a widget, after construct use “set input mode UIOnly” and specify a button (or widget that can take focus), then you can navigate with a controller. If you specify the whole widget, focus won’t take and you need to click on a button or element to get the focus.
It looks like widgets still can’t take actual input, so I’ve got a ‘key bind’ dispatcher in my HUD blueprint that listens for the “use” key and “cancel” key (A & X on a 360 controller), which are relayed to the HUD. Clunky, but it works OK.
What I don’t understand at all: “Set User Focus” and the “event reply structure” it produces. I have no idea what this is, how it works, or what to do with it.
I don’t see any way to change a widget based on focus. They all get a generic engine style dotted line when focused, but I don’t see any way it can be user specified.
Overall, it seems like controller support is technically workable in a bare minimum fashion, but is far from an actual working solution for shipping a game with controller support.
Some things I’d like to see in the future:
- Focus works like ‘hovered’
- the ability to detect ‘hovered’ or ‘focused’ so I can change elements within an element (for example: the color or font on a text element within a button)
- the ability for a widget to actually take input. It seems nuts that a button can be clicked, but if I want a player to be able to execute an action with a controller button, I need to put the logic elsewhere and send it to the HUD.