Download

In menu widget, a mouse press is needed AFTER widget creation, BEFORE it will respond to key presses

I’m a struggling UE4 newbie, and am currently trying to learn a bit about the UMG. The

The title kind of says it all—

So far, I’ve:

  1. Created my menu widget, and
  2. Added the code (is “code” the right word?) to the level BP in order to display the menu immediately after play begins.
  3. Added the code for setting the widget to toggle on/off with the press of the “M” key.

When the game starts, the menu is displayed. However, pressing the “M” key has no effect UNTIL I’ve clicked one of the mouse buttons.

This seems like one of the simplest things to do with the UMG. Is there something I’m missing, here? Thanks, in advance, for your help and suggestions.

try using node setUserFocus after creation

Thanks for your reply. I tried adding the setUserFocus after the addToViewport Output, and added a wire from the createMainMenuWidget Return Value to the setUserFocus Target, but that had no effect. Being so inexperienced with UE4, I could certainly benefit from a bit more clarification. Thanks, again.