aboutsummaryrefslogtreecommitdiff
path: root/client/gui/menus
diff options
context:
space:
mode:
Diffstat (limited to 'client/gui/menus')
-rw-r--r--client/gui/menus/error.gd7
-rw-r--r--client/gui/menus/error.tscn25
2 files changed, 23 insertions, 9 deletions
diff --git a/client/gui/menus/error.gd b/client/gui/menus/error.gd
index e11812d5..efe173c3 100644
--- a/client/gui/menus/error.gd
+++ b/client/gui/menus/error.gd
@@ -15,9 +15,14 @@
#
extends Menu
+@onready var message: Label = $Panel/SmartMarginContainer/Contents/Message
+
func _ready():
super()
- $Panel/SmartMarginContainer/contents/mesage.text = Global.error_message
+ message.text = data[0]
func _on_return_pressed():
replace_menu("res://gui/menus/main/main.tscn")
+
+func _on_reconnect_pressed() -> void:
+ replace_menu("res://gui/menus/game.tscn", data[1])
diff --git a/client/gui/menus/error.tscn b/client/gui/menus/error.tscn
index dcebf322..37f8019f 100644
--- a/client/gui/menus/error.tscn
+++ b/client/gui/menus/error.tscn
@@ -38,33 +38,42 @@ grow_vertical = 2
script = ExtResource("5_rfcg2")
metadata/_custom_type_script = "uid://byshs20og68tn"
-[node name="contents" type="VBoxContainer" parent="Panel/SmartMarginContainer"]
+[node name="Contents" type="VBoxContainer" parent="Panel/SmartMarginContainer"]
layout_mode = 2
alignment = 1
-[node name="title" type="Label" parent="Panel/SmartMarginContainer/contents"]
+[node name="Title" type="Label" parent="Panel/SmartMarginContainer/Contents"]
layout_mode = 2
theme_override_font_sizes/font_size = 61
-text = "Error"
+text = "c.menu.error.title"
horizontal_alignment = 1
-[node name="mesage" type="Label" parent="Panel/SmartMarginContainer/contents"]
+[node name="Message" type="Label" parent="Panel/SmartMarginContainer/Contents"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "This should be the error message."
horizontal_alignment = 1
-[node name="Control" type="Control" parent="Panel/SmartMarginContainer/contents"]
+[node name="Control" type="Control" parent="Panel/SmartMarginContainer/Contents"]
custom_minimum_size = Vector2(0, 15.805)
layout_mode = 2
-[node name="return" type="Button" parent="Panel/SmartMarginContainer/contents"]
+[node name="HBoxContainer" type="HBoxContainer" parent="Panel/SmartMarginContainer/Contents"]
+layout_mode = 2
+alignment = 1
+
+[node name="Return" type="Button" parent="Panel/SmartMarginContainer/Contents/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
-text = "Return to Main Menu"
+text = "c.menu.ingame.main_menu"
+
+[node name="Reconnect" type="Button" parent="Panel/SmartMarginContainer/Contents/HBoxContainer"]
+layout_mode = 2
+text = "c.menu.ingame.reconnect"
[node name="SceneTransition" parent="." instance=ExtResource("4_1nbt3")]
visible = false
layout_mode = 1
-[connection signal="pressed" from="Panel/SmartMarginContainer/contents/return" to="." method="_on_return_pressed"]
+[connection signal="pressed" from="Panel/SmartMarginContainer/Contents/HBoxContainer/Return" to="." method="_on_return_pressed"]
+[connection signal="pressed" from="Panel/SmartMarginContainer/Contents/HBoxContainer/Reconnect" to="." method="_on_reconnect_pressed"]