Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | potatobanana |
how to script " if mouse not inside screen"?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | potatobanana |
how to script " if mouse not inside screen"?
Reply From: | astroboogie |
MainLoop provides these constants:
You can access them from the SceneTree with get_tree().
Reply From: | eod |
Here’s a specific example you can put in your script:
func _notification(what):
match what:
MainLoop.NOTIFICATION_WM_MOUSE_EXIT:
print("Mouse has left game window")
MainLoop.NOTIFICATION_WM_MOUSE_ENTER:
print("Mouse has entered the game window")