du sel dans le menu

This commit is contained in:
Thomas
2025-03-30 08:31:05 +02:00
parent 423ed95f02
commit 9ecea272ab
2 changed files with 22 additions and 2 deletions

View File

@@ -31,12 +31,18 @@ func _on_button_pressed() -> void:
emit_signal("start")
$MarginContainer/Panel/VBoxContainer/Start.text="Continuer"
$MarginContainer/Panel/VBoxContainer/Save.disabled = false
$MarginContainer/Panel/VBoxContainer/info.text=""
func _on_save_pressed() -> void:
emit_signal("save")
set_last_save_info()
$MarginContainer/Panel/VBoxContainer/info.text="Partie sauvegardée"
$MarginContainer/Panel/VBoxContainer/info/Timer.start()
func _on_load_pressed() -> void:
emit_signal("load")
_on_button_pressed()
func _on_timer_timeout() -> void:
$MarginContainer/Panel/VBoxContainer/info.text=""

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://44wla7mlivqm"]
[gd_scene load_steps=7 format=3 uid="uid://44wla7mlivqm"]
[ext_resource type="Script" path="res://UI/menu.gd" id="1_30mo7"]
[ext_resource type="FontFile" uid="uid://c1lnxul6k2adw" path="res://assest/font/vhs-gothic.ttf" id="2_6inip"]
@@ -12,6 +12,9 @@ font_size = 60
[sub_resource type="LabelSettings" id="LabelSettings_i5c8e"]
font_size = 30
[sub_resource type="LabelSettings" id="LabelSettings_6xvf3"]
font_size = 30
[node name="Menu" type="Control"]
layout_mode = 3
anchors_preset = 15
@@ -73,6 +76,17 @@ theme = ExtResource("3_feq31")
disabled = true
text = "Sauvegarder"
[node name="info" type="Label" parent="MarginContainer/Panel/VBoxContainer"]
layout_mode = 2
label_settings = SubResource("LabelSettings_6xvf3")
horizontal_alignment = 1
vertical_alignment = 3
[node name="Timer" type="Timer" parent="MarginContainer/Panel/VBoxContainer/info"]
wait_time = 5.0
one_shot = true
[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Start" to="." method="_on_button_pressed"]
[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Load" to="." method="_on_load_pressed"]
[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Save" to="." method="_on_save_pressed"]
[connection signal="timeout" from="MarginContainer/Panel/VBoxContainer/info/Timer" to="." method="_on_timer_timeout"]