extends CanvasLayer # needs to be a CanvasLayer as parent so it's drawn on top func _ready(): self.pause_mode = PAUSE_MODE_PROCESS func close(): get_tree().paused = false self.queue_free() func _on_Close_pressed(): self.close()