1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00
This commit is contained in:
Manolis Papadeas 2021-11-04 02:46:12 +02:00
parent 5ac51aa798
commit f6b15cb562

View file

@ -289,6 +289,11 @@ func _notification(what : int) -> void:
MainLoop.NOTIFICATION_WM_MOUSE_EXIT: # if the mouse exits the window and another application has the focus set the fps to the idle fps
if !OS.is_window_focused() and Global.fps_limit_focus:
Engine.set_target_fps(Global.idle_fps)
MainLoop.NOTIFICATION_WM_FOCUS_IN:
var mouse_pos := get_global_mouse_position()
var viewport_rect := Rect2(Global.main_viewport.rect_global_position, Global.main_viewport.rect_size)
if viewport_rect.has_point(mouse_pos):
Global.has_focus = true
func _on_files_dropped(_files : PoolStringArray, _screen : int) -> void: