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
454 stars 18 forks source link

Specify input action in Project Settings #19

Open klootas opened 1 year ago

klootas commented 1 year ago

Great plugin! A suggestion for an improvement would be to be able to specify the name of the action used to toggle the visibility in Godot's Project Settings window. Much like this plugin does: https://github-production-user-asset-6210df.s3.amazonaws.com/11432672/269932201-ca604382-569f-4367-ba9a-457aaf1d2a6a.png

Calinou commented 1 year ago

I'm not sure if changing the action's name from the project settings makes sense – it's also prone to typos.

Instead, you should create an action called cycle_debug_menu in the Input Map tab. This isn't done manually due to an editor bug that makes it not refresh automatically if I create it from a @tool script, so it's done at runtime instead: https://github.com/godot-extended-libraries/godot-debug-menu/blob/2d5d67012c76b272173dcfb4947a65dc385fab94/addons/debug_menu/debug_menu.gd#L85-L91

This needs https://github.com/godotengine/godot/issues/25865 to be fixed first.

klootas commented 1 year ago

Ah, I see. While I think it would be nice to specify the name of the input action, the important thing is that we can specify the actual bindings for input 👍