I have an Area2D that I want to be clickable. For that, I am using the input_event signal. Problem is that I don't get how to check for various input events.
I found this old question: https://godotengine.org/qa/22606/how-ive-handled-area2d-mouse-click-not-question
but it is not working in Godot 4
I tried something like:
func _on_area_2d_input_event(viewport, event, shape_idx):
var mouse_button = InputEventMouseButton.new()
if event == mouse_button:
print('entry')
But that does not work. Many thanks for the help!