refactor: 重构主菜单 UI,将 StartMenu 替换为 MainMenu
- 删除旧 StartMenu.tscn,新建 MainMenu.tscn + MainMenu.gd - 新增 MainGame.tscn 主游戏场景作为运行入口 - project.godot 配置 run/main_scene 启动场景 - 添加 doc/design/UI/StartMenu.md 主菜单设计文档 - 新增 assets/ 资源目录结构 (audio/fonts/sprites) - 修复通用资源分析文档中的缩进问题
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
[gd_scene format=3 uid="uid://d1odycoaqhhyg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://drfyh36my6gj2" path="res://src/UI/Panels/MainMenu/MainMenu.gd" id="1_cwvg5"]
|
||||
[ext_resource type="Texture2D" uid="uid://caeqoc6wx8toy" path="res://assets/sprites/ui/BG1.png" id="1_hrti0"]
|
||||
|
||||
[node name="MainMenu" type="Control" unique_id=1416317040]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_cwvg5")
|
||||
|
||||
[node name="BG" type="TextureRect" parent="." unique_id=2104369666]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("1_hrti0")
|
||||
|
||||
[node name="Logo" type="TextureRect" parent="." unique_id=1485724026]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = 60.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 260.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="ButtonGroup" type="VBoxContainer" parent="." unique_id=569064410]
|
||||
layout_mode = 0
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -100.0
|
||||
offset_top = -80.0
|
||||
offset_right = 100.0
|
||||
offset_bottom = 80.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="NewGame" type="Button" parent="ButtonGroup" unique_id=835084060]
|
||||
custom_minimum_size = Vector2(200, 48)
|
||||
layout_mode = 2
|
||||
text = "新游戏"
|
||||
|
||||
[node name="LoadGame" type="Button" parent="ButtonGroup" unique_id=2093610529]
|
||||
custom_minimum_size = Vector2(200, 48)
|
||||
layout_mode = 2
|
||||
text = "读取存档"
|
||||
|
||||
[node name="Settings" type="Button" parent="ButtonGroup" unique_id=2045302694]
|
||||
custom_minimum_size = Vector2(200, 48)
|
||||
layout_mode = 2
|
||||
text = "设置"
|
||||
|
||||
[node name="Quit" type="Button" parent="ButtonGroup" unique_id=818112870]
|
||||
custom_minimum_size = Vector2(200, 48)
|
||||
layout_mode = 2
|
||||
text = "退出"
|
||||
|
||||
[connection signal="button_up" from="ButtonGroup/NewGame" to="." method="MainMenu_NewGame_ButtonUp"]
|
||||
[connection signal="button_up" from="ButtonGroup/LoadGame" to="." method="MainMenu_LoadGame_ButtonUp"]
|
||||
[connection signal="button_up" from="ButtonGroup/Settings" to="." method="MainMenu_Settings_ButtonUp"]
|
||||
[connection signal="button_up" from="ButtonGroup/Quit" to="." method="MainMenu_Quit_ButtonUp"]
|
||||
Reference in New Issue
Block a user