online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/board/BackButton.gd')
| -rw-r--r-- | ui/board/BackButton.gd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/board/BackButton.gd b/ui/board/BackButton.gd new file mode 100644 index 0000000..9d0d362 --- /dev/null +++ b/ui/board/BackButton.gd @@ -0,0 +1,14 @@ +extends Button +class_name BackButton + + +func _ready(): + Events.connect("game_over", self, "game_over") + + +func _pressed(): + Events.emit_signal("go_back", "", true) + + +func game_over(_reason: String, _ok: bool) -> void: + show() |