This repository has been archived on 2022-01-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2021-06-01 23:53:32 +02:00
|
|
|
extends VBoxContainer
|
|
|
|
|
|
|
|
var previous_menu : Node = null
|
2021-09-11 15:22:08 +02:00
|
|
|
var settings = {}
|
|
|
|
@onready var GUI = get_parent()
|
2021-09-24 23:16:54 +02:00
|
|
|
@onready var Main = get_parent().get_parent()
|
2021-06-01 23:53:32 +02:00
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
|
|
|
if previous_menu == null:
|
|
|
|
$Back.hide()
|
|
|
|
|
|
|
|
func open_menu(path : String):
|
2021-07-26 20:51:54 +02:00
|
|
|
var menu = load(path).instantiate()
|
2021-06-01 23:53:32 +02:00
|
|
|
menu.previous_menu = self
|
|
|
|
get_parent().add_child(menu)
|
|
|
|
hide()
|
|
|
|
|
|
|
|
func go_back():
|
2021-09-12 01:17:53 +02:00
|
|
|
$Back/ClickSound.play()
|
2021-06-01 23:53:32 +02:00
|
|
|
previous_menu.show()
|
|
|
|
previous_menu = null
|
|
|
|
queue_free()
|
2021-09-11 15:22:08 +02:00
|
|
|
|
2021-09-12 01:17:53 +02:00
|
|
|
func _on_Back_mouse_entered():
|
|
|
|
$Back/HoverSound.play()
|