Moving a selection icon with keyoard inputs

I am very new to Unreal Editor and I’m struggling to get the basics. All I want is to move an onscreen icon using arrow keys and to select using the enter key or somesuch. I have a menu screen set up already with new game/continue etc. on it, but I don’t know what to use to just simply scroll through selections using the arrow keys, similar to an NES game, or even what to use as a cursor (just an image? something else?).
Thanks in advance

Hey Pumpkin,

I think what you’re looking for is the UMG Widget. This will allow you to have multiple images/icons/buttons in your viewport that you should be able to organize and move in the manner of your choosing.

https://docs.unrealengine.com/latest/INT/Engine/UMG/index.html

Here’s the thing, though. It turns out that I do have a UMG Widget, I just don’t now how to actually program in the blueprints to get something like, "when down arrow key is pressed, move icon from ‘continue’ to ‘new game.’ What blueprint things would I add?
Thanks for answering this, though.

Oh I see.

I looked around and I believe this is what you’re looking for:
https://answers.unrealengine.com/questions/147619/umg-gamepadkeyboard-navigation-in-umg-menus.html

In essence, in the same place that you add your widget to your viewport you need to ‘Set Keyboard Focus’ as well.

Can the widget I want to move just be an “Image” or does it have to be something else? I generally am pretty quick to learn with these types of softwares; it’s just a matter of understanding the lingo and finding where everything is. I know my little cursor icon image is a widget, I just don’t know where to find “Set keyboard focus” or what to do with it when I do, but I can probably figure that out when I get to it. Sorry for my noobishness.

For your case, it should be a button rather than an image. You can change how the button looks to show your image with the added functionality of having events like ‘OnClicked’.

After your ‘Add Widget to Viewport’ node, just draw out another line and look for ‘Set Keyboard Focus’. You might have to untick Context.

So I’m not necessarily making the button’s image move; I’m just having four different buttons in which I’m using the keyboard to scroll between and “click” on via the enter key, etc.

Also, I’ve been able to set up Add to Viewport and Set Keyboard Focus, but that’s all I got. I don’t know how to connect it to my buttons, or how to make it so that pressing down will scroll down…

If Add to Viewport and Set Keyboard Focus is all you’ve implemented, they COULD be working, it’s just that you can’t tell.

You need to also implement some way to show which button you’re on.

This image is from the link I posted above. This will let you see exactly which button is focused
https://answers.unrealengine.com/storage/attachments/42960-keyboard2.png

Urgh! I have everything that the image has, and I even figured out how to change it so that if false the image would be completely dark and if true the image would be completely visible. However, the For Each Loop’s Array Element doesn’t want to connect to the Set Color and Opacity’s Target. It’s also saying that the type of [0] through [3] is undetermined, and I need to connect something to imply a type. Hoo, boy… And all I wanted to do was to make a main menu…

Thanks for your help, though. I feel that you’ve done more than enough.

Make sure that the array is an array of Buttons. Also, the Set Color and Opacity should be ‘Target is Button’. If you have these two correct, then they should be able to be wired together.

A main menu is pretty simple, its just that what you’re looking for (buttons interaction with WASD) takes a little more effort.

Don’t give up yet hah

Although I do have the array of buttons, the Set Color and Opacity says that the target is “self,” and it adamantly refuses to be changed, no matter how much double-clicking, right-clicking, or anything I do.
As a side not, I fixed my array problem by deleting the array widget and just redoing it. Go figure.

OK! I managed to get my stuff to look like the picture! I had to delete the Set Color and Opacity, then recreate it by dragging the line from ForEachLoop out and creating it from there. I have yet to see if it actually works.

here’s my blueprint. I hit the “play” button, but hitting the arrow keys, wasd, or even just clicking on my buttons does nothing to their images. At all. And where exactly do I program which key does what? I think I know what everything does except the Event Tick thing.

Another question: this looks like all it does is say “when this button is highlighted, make it a different color.” Is this true? And if so, how do I program the arrow keys to actually make it scroll through each selection (e.g. when New Game Button is highlighted and I press “up” on the keyboard, move to highlight “continue” button.)