Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent console toggling input from being interpreted twice #126

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

mieldepoche
Copy link
Contributor

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 godotengine/godot#80158 (comment))

(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)

@mieldepoche mieldepoche changed the title Prevent toggle input to be interpreted twice Prevent console toggling input from being interpreted twice Aug 4, 2023
@Ark2000 Ark2000 merged commit f9ec2db into Ark2000:master Aug 12, 2023
@Ark2000
Copy link
Owner

Ark2000 commented Aug 12, 2023

Good to know it, thanks for your pr!

@mieldepoche mieldepoche deleted the fix_double_toggle branch August 12, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants