aboutsummaryrefslogtreecommitdiff
path: root/client/gui
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2026-03-25 21:17:04 +0100
committertpart <tpart120@proton.me>2026-03-25 21:17:04 +0100
commitf0dc69767a7ed4a473e8fa76298912f34723bdf2 (patch)
tree536b83d8db3c215cf9c71c5fd1e6eb3b8b6c56b7 /client/gui
parent208799c2a4c559b1d35c956046c8ec612f8cc248 (diff)
downloadhurrycurry-f0dc69767a7ed4a473e8fa76298912f34723bdf2.tar
hurrycurry-f0dc69767a7ed4a473e8fa76298912f34723bdf2.tar.bz2
hurrycurry-f0dc69767a7ed4a473e8fa76298912f34723bdf2.tar.zst
Add back button to map selector menu
Diffstat (limited to 'client/gui')
-rw-r--r--client/gui/menus/map_selector/map_selector.gd3
-rw-r--r--client/gui/menus/map_selector/map_selector.tscn9
2 files changed, 12 insertions, 0 deletions
diff --git a/client/gui/menus/map_selector/map_selector.gd b/client/gui/menus/map_selector/map_selector.gd
index 7f31d7cf..b79460b7 100644
--- a/client/gui/menus/map_selector/map_selector.gd
+++ b/client/gui/menus/map_selector/map_selector.gd
@@ -38,3 +38,6 @@ func select_map(map):
func _menu_cover(state: bool):
# TODO: Find a better way to hide this menu without hiding submenu, this feels hacky
$OuterMargin.visible = not state
+
+func _on_back_pressed() -> void:
+ exit()
diff --git a/client/gui/menus/map_selector/map_selector.tscn b/client/gui/menus/map_selector/map_selector.tscn
index 7a7f4c2c..b88ec0ea 100644
--- a/client/gui/menus/map_selector/map_selector.tscn
+++ b/client/gui/menus/map_selector/map_selector.tscn
@@ -65,3 +65,12 @@ script = ExtResource("6_7xmra")
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
+
+[node name="HBoxContainer" type="HBoxContainer" parent="OuterMargin/Panel/InnerMargin/VBoxContainer" unique_id=1907231166]
+layout_mode = 2
+
+[node name="Back" type="Button" parent="OuterMargin/Panel/InnerMargin/VBoxContainer/HBoxContainer" unique_id=1801916460]
+layout_mode = 2
+text = "c.menu.back"
+
+[connection signal="pressed" from="OuterMargin/Panel/InnerMargin/VBoxContainer/HBoxContainer/Back" to="." method="_on_back_pressed"]