1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
extends CanvasLayer # needs to be a CanvasLayer as parent so it's drawn on top func _ready(): self.process_mode = PROCESS_MODE_ALWAYS func close(): get_tree().paused = false self.queue_free() func _on_Close_pressed(): self.close()