mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
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:
@@ -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():
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user