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"

How to correctly override NativeOnFocusReceived / NativeOnFocusLost for UUserWidget?

Hi,

I'm trying to figure out how to correctly override NativeOnFocusReceived and NativeOnFocusLost for a custom UUserWidget.

I have a Main Menu (UUserWidget) with a couple of Buttons (other UUserWidget) inside.

For the buttons, I did an override for both those functions (for now, they just print a message, but I plan to use them to highlight the currently focused button and turn the highlight off when it looses focus).

When the game begins, I manually SetUserFocus on the first button, and it works (it prints the message I put into the overridden version of NativeOnFocusReceived). If I select the second button, it even prints the message I put inside of the overridden version of NativeOnFocusLost, but after that, both of them never print again, for either buttons.

Am I missing something here? Or is there a different way to accomplish this?

Thanks!

Product Version: UE 4.15 Preview
Tags:
more ▼

asked Feb 02 '17 at 09:11 PM in C++ Programming

avatar image

AXE
71 3 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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