Code reorganizing

This commit is contained in:
Maurane
2026-02-24 18:01:23 +01:00
parent 450d372775
commit a9698155fa
52 changed files with 1458 additions and 679 deletions
+42
View File
@@ -0,0 +1,42 @@
extends CanvasLayer
signal new_game_pressed
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#Connecting signals
$TitleScreen/MenuContainer/NewGame.pressed.connect(_on_new_game_pressed)
$TitleScreen/MenuContainer/Load.pressed.connect(_on_load_pressed)
$TitleScreen/MenuContainer/Settings.pressed.connect(_on_settings_pressed)
$TitleScreen/MenuContainer/QuitGame.pressed.connect(_on_quit_game_pressed)
#Hiding everything
self.hide()
func _on_new_game_pressed() -> void:
new_game_pressed.emit()
func _on_load_pressed():
UI.get_node("UI/Load").show()
UI.get_node("UI/Load/MarginContainer/VBoxContainer/Control/Back").hide()
UI.get_node("UI/Load/MarginContainer/VBoxContainer/Control/BackTitle").show()
TransitionScreen.mask.visible = true
func _on_settings_pressed() -> void:
UI.get_node("UI/Settings").show()
UI.get_node("UI/Settings/MarginContainer/VBoxContainer/Control/Back").hide()
UI.get_node("UI/Settings/MarginContainer/VBoxContainer/Control/BackTitle").show()
TransitionScreen.mask.visible = true
func _on_quit_game_pressed():
get_tree().quit()