a game about throwing hammers made for the github game off
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extends ColorRect

signal close

@export var focus: Control

func open() -> void:
  show()
  focus.button.grab_focus()

func _input(event: InputEvent) -> void:
  if visible and event is InputEventKey and event.keycode == KEY_ESCAPE:
    close.emit()
    hide()

func _on_exit_pressed() -> void:
  close.emit()
  hide()