giants-godot/ui/menus/ingame_menu.gd
2021-10-01 15:50:16 +02:00

24 lines
593 B
GDScript

extends BaseUI
onready var options_menu = preload("res://ui/menus/options_menu.tscn").instance()
func _ready():
options_menu.called_ui = self
options_menu.connect("tree_exited", self, "options_menu_closed")
func _on_Resume_pressed():
get_parent().remove_child(self)
func _on_Options_pressed():
get_parent().add_child(options_menu)
self.visible = false
# get_parent().remove_child(self)
func options_menu_closed():
self.visible = true
func _on_MainMenu_pressed():
get_tree().change_scene("res://scenes/intro_island/MainMenu.tscn")
func _on_ExitGame_pressed():
get_tree().quit()