Ark2000 / PankuConsole

Feature-packed real-time debugging toolkit for Godot Engine.
https://k2kra.xyz/PankuConsole/
MIT License
997 stars 38 forks source link

Prevent console toggling input from being interpreted twice #126

Closed mieldepoche closed 1 year ago

mieldepoche commented 1 year ago

This is required since for each frame, _input might run several times (if you have several input events, such as moving the mouse and clicking it at the same time). As a result, just checking the global state with Input.is_action_just_pressed will return true for both events and will show and hide the console in the same frame. (see https://github.com/godotengine/godot/issues/80158#issuecomment-1661865675)

(to check that it's a problem, you can move the mouse continually and try toggling the console: you'll notice it sometimes doesn't show up)

Ark2000 commented 1 year ago

Good to know it, thanks for your pr!