UMG widget button needs arrow input before focus
So I'm trying to make a menu system that uses the keyboard or gamepad. For the most part, it works, you can highlight a button and select it. My issue is, when I first open the menu, my widget doesn't get keyboard focus until I press the down arrow on the keyboard. This results in you skipping the first button on the menu, but pressing the up arrow afterwards allows you to highlight and select it. This is when you first open the menu:
This is after you press the down arrow: and then when you press up: I have tried using set InputMode but that just yields the same results. I can't work out if this is a bug or if this is just down to me not using the functions correctly, the blue print I'm using for my menu widget is below. Any help would be much appriciated
Edit: completely misread, my apologies, thought arrow was 'mouse arrow'. However, I still think this may yield some assistance towards resolution.
Ah, yes, I had fun trying to figure this one out myself with my inventory system. Took me a while too, but this is what ultimately worked, regardless of how bizarre it may seem haha.
Now I've included everything that I use to display and hide my inventory system, so most of this may be unrelated, however, I included it just in case. The main one I think you will need is the first image, the Widget BP Nodes.
Hopefully this helps in some way!
Try calling SetUserFocus and sending the GetPlayerController to that node, after setting keyboard focus in your Construct event.
answered Apr 30 '18 at 07:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here