ArkSol/scripts/menu.gd
2025-10-27 19:09:46 +01:00

36 lines
849 B
GDScript

extends Control
@onready var option_popup = $OptionPopup
@onready var back_button = $TextureRect/back
func _ready():
$TextureRect/start.connect("pressed", Callable(self, "_on_start_pressed"))
$TextureRect/exit.connect("pressed", Callable(self, "_on_exit_pressed"))
$TextureRect/option.connect("pressed", Callable(self, "_on_opcje_pressed"))
$TextureRect/back.connect("pressed", Callable(self, "_on_back_pressed"))
#if Manager.game_lunched == true:
#back_button.visible = true
#else :
#MusicManager.play_music()
#back_button.visible = false
func _on_opcje_pressed():
option_popup.popup_centered()
func _on_start_pressed():
get_tree().change_scene_to_file("res://scenes/galaxy.tscn")
func _on_exit_pressed():
get_tree().quit()
func _on_back_pressed():
get_tree().change_scene_to_file("res://scenes/galaxy.tscn")