8 lines
264 B
GDScript
8 lines
264 B
GDScript
|
extends PanelContainer
|
||
|
|
||
|
func _unhandled_key_input(event:InputEvent):
|
||
|
var key_event:InputEventKey = event as InputEventKey
|
||
|
if visible and key_event.pressed and key_event.get_keycode_with_modifiers() == KEY_ESCAPE:
|
||
|
get_viewport().set_input_as_handled()
|
||
|
hide()
|