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:
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.
Thanks for your input but unfortunately I’ve been unable to yield any results I’ve tried messing around with the is focusable bool but it seems sort of redundant since I already have is focusable ticked in the details panel.
I had what I think is a similar issue, where I manually set focus on a widget when opening a pause menu, but pressing the button with gamepad input wouldn’t register, despite the widget definitely being in focus. If I navigated to a different button and then back to the first one it worked, but never on opening the menu.
I solved it by overriding the “OnKeyUp” function in the widget and inserting relevant event/functions on a switch based on the pressed key name. You can also use “OnKeyDown”, but that was causing other issues with my setup.
Just in case this may be useful. Maybe this is what was happening to you guys. In my case, I needed to target the actual button within the widget because I was using a custom widget button inside another menu widget. Targeting the widget button won’t work because it’s actually a “canvas”, you need to target the button inside the canvas instead.