A function to get the widget that currently has focus

I’ve extended the user widgets that I use and I keep track of which widget has focus with NativeOnFocusReceived, but it would be nice if there was an engine level function that kept track of this for you, especially for widgets you don’t extend.

In Unity, the engine keeps track of this for you with their event system with eventSystem.currentSelectedGameObject.

As an extension of this feature request, a function to get the widget that last had focus would be nice too.

Made a quick version in blueprints but it can be easily done in c++ if needed.
Just calling an interface for visual confirmation

widgetGetFocus.zip (98.4 KB)

press 1 to get the last focused widget

1 Like

Thanks Raven. That should work.