giants-godot/ui/menus/ingame_menu.gd

24 lines
593 B
GDScript3
Raw Normal View History

2021-09-17 15:04:05 +02:00
extends BaseUI
2021-09-22 18:04:03 +02:00
onready var options_menu = preload("res://ui/menus/options_menu.tscn").instance()
2021-09-17 15:04:05 +02:00
func _ready():
options_menu.called_ui = self
2021-10-01 15:50:16 +02:00
options_menu.connect("tree_exited", self, "options_menu_closed")
2021-09-17 15:04:05 +02:00
func _on_Resume_pressed():
get_parent().remove_child(self)
func _on_Options_pressed():
get_parent().add_child(options_menu)
2021-10-01 15:50:16 +02:00
self.visible = false
# get_parent().remove_child(self)
func options_menu_closed():
self.visible = true
2021-09-17 15:04:05 +02:00
func _on_MainMenu_pressed():
get_tree().change_scene("res://scenes/intro_island/MainMenu.tscn")
func _on_ExitGame_pressed():
get_tree().quit()