Godot Version
4.2.2
Question
I need to create a popup window for my plugin - similar to how Quick Open works in Godot. I see that in the engine they just call ->gui_input(event)
directly on the node they need (a Tree
in this case). Source: godot/editor/editor_quick_open.cpp at 0a9d8f04c10870c0f9f7bbd2e0505edc8494e299 · godotengine/godot · GitHub
However, in GDScript there’s no such method. I tried to emulate similar behavior with the following, but with no success:
line_edit.gui_input.connect(func(event: InputEvent) -> void:
var copy := event.duplicate()
line_edit.accept_event()
tree.grab_focus()
Input.parse_input_event(copy)
line_edit.grab_focus()
)
Am I doing something wrong?