mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Fixes #552
This commit is contained in:
parent
5ac51aa798
commit
f6b15cb562
|
@ -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
|
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:
|
if !OS.is_window_focused() and Global.fps_limit_focus:
|
||||||
Engine.set_target_fps(Global.idle_fps)
|
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:
|
func _on_files_dropped(_files : PoolStringArray, _screen : int) -> void:
|
||||||
|
|
Loading…
Reference in a new issue