closes #118 | added double click de-bounce of 0.2s#123
closes #118 | added double click de-bounce of 0.2s#123ZachAR3 wants to merge 1 commit intoMakovWait:mainfrom
Conversation
|
Apparently there is a specific way already in_engine to check for double clicks. |
@novadragonDOTspace If you look at my commit and source you will see the double click function is being used, and while it does register double clicks it will keep reigsterinng a "double click" for every click after the first as well (i.e. a triple click would trigger it 2 times). That's why I said it was an issue in the Godot source |
|
okay, sorry. I am straight up blind. |
|
|
||
|
|
||
| func _gui_input(event: InputEvent) -> void: | ||
| var time := Time.get_ticks_msec() |
There was a problem hiding this comment.
Should this declaration line be moved down to just before time is used? (Just before line 44)
That would prevent the variable from being assigned on each GUI Input event if it isn't needed.
|
I was not able to reproduce the issue. Perhaps it disappeared in Godot 4.5? |
|
I also cannot reproduce #118. Even when I intentionally click 4-5 times before the window goes away as it launches the project, the project is only opened one time. And that was using Godots v1.3, which I just realized is not the latest release. So I just updated to v1.4 and I still can't reproduce the issue. My OS is Windows 10. Perhaps the issue only happens on MacOS? |
|
Okay actually I can reproduce the issue. If I go into the settings and disable the Auto Close option (which is disabled by default) then Godots remains open when opening a project, and will accept the furious clicking and open the project multiple times. But if I have Auto Close enabled then the Godots window will close before opening the project multiple times. |
Added a basic de-bounce timer for the double click to help resolve issues of projects opening multiple times. The root issue lies in the Godot source though, as the double click function shouldn't be triggered multiple times unless actually pressed in the first place.