x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Clicking changes focus from widget to viewport

Hello,

I'm trying to create a menu that can be navigated through keyboard/controller only.

Right now, the issue I'm running into is the menu widget losses focus if there's a click input from the mouse. It doesn't seem to matter if the mouse has been captured, hidden, or if an input mode is specified. Steps to reproduce:

Create empty level

Create widget blueprint

Add button to widget

Display widget in level (as per LevelBlueprint.png the button will have focus from the keyboard) alt text

Launch game in New Editor Window

Following these steps gets the button focused and responds to keyboard input, which can be verified by using the Widget Reflector (Window --> Developer Tools --> Widget Reflector, then check "Show Focus") but once the viewport has been clicked the keyboard will lose focus (BeforeClick.png and AfterClick.png).

I've tried just about every solution I can find to no avail. The closest I've come to resolving the issue was through the very similar post https://answers.unrealengine.com/questions/443634/bug-losing-focus-when-clicking-in-level-view.html

The conclusion in that answer section was:

"I made a blueprint exposed function that looksup the currently focused widget and sets a focus reply event. I called it keepfocushandled which returns an event reply for the mouse down event. This works fine, although this solves my mouse click issues i found thst keyboard navigation can also cause the viewport to receive focus. It would be great if you guys would show an umg example which supports keyboard, gamepad and mouse navigation."

I'm uncertain as to how you can look up the currently focused widget however. I'm at a loss.

Any help would be greatly appreciated!

Product Version: UE 4.14
Tags:
beforeclick.png (571.3 kB)
afterclick.png (575.6 kB)
levelblueprint.png (88.1 kB)
more ▼

asked Feb 03 '17 at 03:55 AM in Using UE4

avatar image

dooblyd19
1 1 1 1

avatar image mikezteh69 Apr 02 '18 at 01:32 PM

I am having a similar problem and I have not found a resolution to this yet. Anyone out there have an idea?

avatar image ParadiseVR Feb 01 '19 at 12:26 AM

I have the exact same problem.. Please, we need help !!! lol

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Got same problem, my most blunt solution so far is: alt text

keepfocus.png (43.7 kB)
more ▼

answered Jan 29 '19 at 03:29 PM

avatar image

cyberdei
1 1

avatar image mikezteh69 Jan 29 '19 at 05:10 PM

Getting the player controller and setting focus on tick seems pretty expensive.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question