how to use get_focus_owner?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By reinapepiada

I can’t find it anywhere for some reason, how do I use the get_focus_owner method in script?

:bust_in_silhouette: Reply From: exuin

Found it here in the docs. You must call it on an instance of a Control node. So, like a Button or a TextureRect or anything else that inherits from Control (the green nodes).

Thank you! I really needed this

Turns out apparently this doesn’t work if there are other types of nodes as children of the Control node (not 100% sure but it started working for me after I tried it)

reinapepiada | 2020-10-06 00:50