game: add menu

This commit is contained in:
2025-08-14 23:20:05 +02:00
parent 40d09e5b46
commit 3f9e261a53
9 changed files with 116 additions and 4 deletions

36
game/main_menu.tscn Normal file
View File

@@ -0,0 +1,36 @@
[gd_scene load_steps=2 format=3 uid="uid://3pysj67x88uw"]
[ext_resource type="Script" uid="uid://bsx7nporxaoa6" path="res://main_menu.gd" id="1_06t4h"]
[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_06t4h")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="Play" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Play Game"
[node name="Options" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Options"
[node name="Quit" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Quit"
[connection signal="pressed" from="MarginContainer/VBoxContainer/Play" to="." method="_on_play_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Options" to="." method="_on_options_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"]