mirror of
https://github.com/GDQuest/godot-platformer-2d.git
synced 2026-01-23 02:14:19 +00:00
Fix Debug Panel not toggling visibiltiy
I think that since the DebugPanel is not an in-game element, it should handle inputs regardless of the game's internal state, that's why I think it should use `_input` callback instead of `_gui_input` Closes: #170
This commit is contained in:
parent
9b1038ccbb
commit
044be5f3df
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
extends MarginContainer
|
||||
# Contains UI widgets that display debug info about the game world
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed('toggle_debug_menu'):
|
||||
visible = not visible
|
||||
accept_event()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue