godot-extended-libraries / godot-debug-menu

Display in-game FPS/performance/hardware metrics in a Godot 4.x project
https://github.com/godot-extended-libraries/godot-debug-menu-demo
MIT License
429 stars 16 forks source link

The most minor problem ever: F3 to "pop up" #5

Closed Dangomation closed 1 year ago

Dangomation commented 1 year ago

Not a big issue of course just a bit annoying that's all:

Having the key detection exclusively when the key is reported is annoying when you can "flicker" the Debug Menu Performance screen by holding the key.

image

What I replaced it with is of course a super simple solution I've done up myself. Change to some sort of "just pressed" please. Thanks!

Calinou commented 1 year ago

The current version has already fixed this: https://github.com/godot-extended-libraries/godot-debug-menu/blob/9ddf09b25cba9e13f84a5ff27ee72f6ca6127f19/addons/debug_menu/debug_menu.gd#L130

In all Godot versions, event.is_action_pressed() should already take care of ignoring echo events (key repeats when held down). I've never needed Input.is_action_just_pressed() in _event() for this reason (it's useful in _process()/_physics_process() though).