du sel dans le menu
This commit is contained in:
@@ -31,12 +31,18 @@ func _on_button_pressed() -> void:
|
|||||||
emit_signal("start")
|
emit_signal("start")
|
||||||
$MarginContainer/Panel/VBoxContainer/Start.text="Continuer"
|
$MarginContainer/Panel/VBoxContainer/Start.text="Continuer"
|
||||||
$MarginContainer/Panel/VBoxContainer/Save.disabled = false
|
$MarginContainer/Panel/VBoxContainer/Save.disabled = false
|
||||||
|
$MarginContainer/Panel/VBoxContainer/info.text=""
|
||||||
|
|
||||||
func _on_save_pressed() -> void:
|
func _on_save_pressed() -> void:
|
||||||
emit_signal("save")
|
emit_signal("save")
|
||||||
set_last_save_info()
|
set_last_save_info()
|
||||||
|
$MarginContainer/Panel/VBoxContainer/info.text="Partie sauvegardée"
|
||||||
|
$MarginContainer/Panel/VBoxContainer/info/Timer.start()
|
||||||
|
|
||||||
func _on_load_pressed() -> void:
|
func _on_load_pressed() -> void:
|
||||||
emit_signal("load")
|
emit_signal("load")
|
||||||
_on_button_pressed()
|
_on_button_pressed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_timer_timeout() -> void:
|
||||||
|
$MarginContainer/Panel/VBoxContainer/info.text=""
|
||||||
|
|||||||
16
UI/menu.tscn
16
UI/menu.tscn
@@ -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="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"]
|
[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"]
|
[sub_resource type="LabelSettings" id="LabelSettings_i5c8e"]
|
||||||
font_size = 30
|
font_size = 30
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_6xvf3"]
|
||||||
|
font_size = 30
|
||||||
|
|
||||||
[node name="Menu" type="Control"]
|
[node name="Menu" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
@@ -73,6 +76,17 @@ theme = ExtResource("3_feq31")
|
|||||||
disabled = true
|
disabled = true
|
||||||
text = "Sauvegarder"
|
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/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/Load" to="." method="_on_load_pressed"]
|
||||||
[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Save" to="." method="_on_save_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"]
|
||||||
|
|||||||
Reference in New Issue
Block a user