TinyAdventure/ui/game_menu_ui.gd

8 lines
255 B
GDScript
Raw Normal View History

extends Panel
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()