Merge pull request #858 from KMouratidis/patch-1

Fix "is mount_event" check in gui_in_3d to work with both 4 beta and 4 rc
This commit is contained in:
Rémi Verschelde
2023-02-28 16:41:09 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ func _make_visible(visible):
# If your plugin doesn't handle any node types, you can remove this method.
func _handles(object):
return object is preload("res://addons/main_screen/handled_by_main_screen.gd")
return is_instance_of(object, preload("res://addons/main_screen/handled_by_main_screen.gd"))
func _get_plugin_name():

View File

@@ -36,7 +36,7 @@ func _unhandled_input(event):
# Check if the event is a non-mouse/non-touch event
var is_mouse_event = false
for mouse_event in [InputEventMouseButton, InputEventMouseMotion, InputEventScreenDrag, InputEventScreenTouch]:
if event is mouse_event:
if is_instance_of(event, mouse_event):
is_mouse_event = true
break