Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Aaron |
How do I detect when the game itself loses or gains focus (user alt-tabbed, user switched to other window, etc.)?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Aaron |
How do I detect when the game itself loses or gains focus (user alt-tabbed, user switched to other window, etc.)?
Reply From: | volzhs |
func _notification(what):
if what == MainLoop.NOTIFICATION_WM_FOCUS_IN:
print("focus in")
elif what == MainLoop.NOTIFICATION_WM_FOCUS_OUT:
print("focus out")
This is not working on the HTML5 exported version of my game.
Any workaround?
dpensky | 2021-04-20 12:09