Gamepad/Keyboard navigation in UMG menus?

Is there a way to get rid of the dotted square?

Which version are you on? I can’t find this method in 4.8.3

Yea just checked git history and this function never existed in UGameViewportClient.h . Did not seem proper anyway as we still want to show the cursor itself but only hide that hideous dotted focus line.

Sorry I was mistaken on the function to override, this is the good one:

UCLASS()
class UMyGameViewportClient : public UGameViewportClient
{
	GENERATED_BODY()

public:

	virtual TOptional<bool> QueryShowFocus(const EFocusCause InFocusCause) const override;
	
}

.cpp code:

TOptional<bool> UMyGameViewportClient::QueryShowFocus(const EFocusCause InFocusCause) const
{
	return false;
}

With this, the dotted line will no longer appear.

Tell me if this works for you.

will mouse clicks still work? it’s nice to have it both ways on PC

Any ideas on changing just the button color and not the text color?

Cheers

It worked for me, on 4.9.2.

Just make sure to restart the editor to apply the .ini changes.

use SetBackgroundColor for each button

I’d like to change the dotted line to something more visible (especially for 3D UMG Widgets in VR). Anyone know if it is possible to replace the dashed line with the hover behavior of widgets, or at least make the dashed line much more visible?

As of 4.8: Project Settings / User Interface / RenderFocusRule (Set To) Never

1 Like

As of 4.8: Project Settings / User Interface / RenderFocusRule (Set To) Never

To hide the dotted line go to ProjectSettings - User Interface. Render Focus Rule set to never. That’s all you need)

IF set keyboard focus DOESN’T WORK TRY ADDING A DELAY ! FIXED MY PROBLEM

I’ve got a UMG 3d widget menu working but i’m struggling to get a dynamic Inventory system working with gamepad control. It only seems to interact with the last item in the inventory.

Menu system

Dynamic Inventory

Inventory gamepad control blueprint.

The link is broken =/ Really excited to check out the sample project to see how you did this! Really stuck trying to figure out how to program the “continue” with the gamepad - don’t even really need to program every option to a key on the gamepad - just simply have it when I hit “any key” it goes next (for cinematic) any help would be very much appreciated

@CodeSpartan Thank you so much for posting that solution! I had budgeted myself up to a day to get this working and with your help I was able to implement the feature in under 2 hours!

Geez… I did exactly as suggested in the Blueprint of my Level, but all it does is allows the enter key to “Click” the target button… The arrow keys don’t do anything at all. Does anyone have any suggestions on what might be wrong?

updated link for 2017 please?! :slight_smile:

Thx for your solustion .That works for me .

#Rama Plugin Solution

I made a Gamepad UMG plugin so you can use UMG with a gamepad.

Nick Darnell from Epic wrote the code and I made it into a plugin.

#:heart:

Rama