0 votes


how can I handle click and doubleclick on the same node different?

extends Area2D

func _on_MouseClick_input_event(viewport, event, shape_idx):
    if event is InputEventMouseButton and event.doubleclick:
    elif event is InputEventMouseButton and event.pressed:

Each time I do one doubleclick on the node the output in the log is:

asked Jul 19 in Projects by mrkaio (18 points)

1 Answer

+1 vote
Best answer

This is right. Take selecting folders as an example, the first click selects it and if the second click is within the time limit for a double click it opens, thus the log would print single, double and clicking too slowly will print single, single.

answered Jul 20 by Magso (721 points)
selected Aug 6 by mrkaio
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.