This commit is contained in:
2025-06-16 07:59:50 +08:00
commit 7a6cd423fc
54 changed files with 4068 additions and 0 deletions

70
scenes/main_menu.tscn Normal file
View File

@ -0,0 +1,70 @@
[gd_scene load_steps=2 format=3 uid="uid://dc48a40brl4hm"]
[ext_resource type="Script" path="res://scripts/MainMenu.cs" id="1_3k4vx"]
[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_3k4vx")
[node name="Background" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.15, 0.15, 0.25, 1)
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -120.0
offset_top = -150.0
offset_right = 120.0
offset_bottom = 150.0
grow_horizontal = 2
grow_vertical = 2
[node name="Title" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "游戏主菜单"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Spacer1" type="Control" parent="VBoxContainer"]
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
[node name="NewGameBtn" type="Button" parent="VBoxContainer"]
custom_minimum_size = Vector2(240, 50)
layout_mode = 2
text = "新游戏"
[node name="LoadGameBtn" type="Button" parent="VBoxContainer"]
custom_minimum_size = Vector2(240, 50)
layout_mode = 2
text = "载入存档"
[node name="SettingsBtn" type="Button" parent="VBoxContainer"]
custom_minimum_size = Vector2(240, 50)
layout_mode = 2
text = "设置"
[node name="ExitBtn" type="Button" parent="VBoxContainer"]
custom_minimum_size = Vector2(240, 50)
layout_mode = 2
text = "退出游戏"
[connection signal="pressed" from="VBoxContainer/NewGameBtn" to="." method="_OnNewGameBtnPressed"]
[connection signal="pressed" from="VBoxContainer/LoadGameBtn" to="." method="_OnLoadGameBtnPressed"]
[connection signal="pressed" from="VBoxContainer/SettingsBtn" to="." method="_OnSettingsBtnPressed"]
[connection signal="pressed" from="VBoxContainer/ExitBtn" to="." method="_OnExitBtnPressed"]