How do i handle action mappings on an UMG Widget?

i made a dummy actor, just an empty actor that gets spawned by the player when he opens the menu. on begin play, that actor creates the menu, and disables the player character’s input (using disable input with the character as target and player controller as controller). it also enables input on itself, using enable input.

it then calls set input mode game and ui. that function has a pin for a widget to focus on. important to put the newly created widget in there, otherwise your first click wont work - it will only focus the widget.

this dummy actor also responds to the input action. it basically just undoes everything, removes the menu and re-enables control for the player.

there is one problem with this approach: if you have a textfield in the ui and you press a button that’s also the input action for closing the menu, it will type the character and close the menu. since i don’t think i’ll have a textfield in there, i didn’t bother figuring out how to fix it.

in the screenshot below, i set the focus to hud reference instead of the menu i created, but that’s just something i haven’t sorted out yet. (gotta move some widgets from the permanent hud to the menu).

hope this helps, can’t guarantee any of this is correct or a good idea. :stuck_out_tongue: was kinda surprised you were still interested in such an old question.

edit: just saw that for the enable input for the player character, the target pin is connected to the character and the controller… it still works, apparently, but it only needs the player character as target.