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:
Henrique Campos 2020-01-24 10:34:48 -03:00
parent 9b1038ccbb
commit 044be5f3df

View file

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