初始化仓库

This commit is contained in:
2026-08-10 23:35:23 +08:00
commit 8399ee5664
48 changed files with 1097 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
extends Control
func _ready() -> void:
pass
func _on_MainMenu_NewGame_ButtonUp() -> void:
pass # Replace with function body.
func _on_MainMenu_LoadGame_ButtonUp() -> void:
$Menu.hide()
$SavePannel.show()
pass # Replace with function body.
func _on_MainMenu_Settings_ButtonUp() -> void:
pass # Replace with function body.
func _on_MainMenu_Exit_ButtonUp() -> void:
get_tree().quit()
pass # Replace with function body.
func _on_SavePannel_Esc_pressed() -> void:
$SavePannel.hide()
$Menu.show()
pass # Replace with function body.
+1
View File
@@ -0,0 +1 @@
uid://re0q67p6ppnv
+74
View File
@@ -0,0 +1,74 @@
[gd_scene format=3 uid="uid://q1b6t22ej3ej"]
[ext_resource type="Texture2D" uid="uid://yosl3o8yjyks" path="res://assets/sprites/ui/图片大门.png" id="1_hrti0"]
[ext_resource type="Script" uid="uid://re0q67p6ppnv" path="res://src/UI/Panels/MainMenu/MainMenu.gd" id="1_wrf65"]
[ext_resource type="Theme" uid="uid://b3cyleh82wiq4" path="res://resources/mainmenu_button_theme.tres" id="2_cwvg5"]
[ext_resource type="PackedScene" uid="uid://cqdytnp2v07v" path="res://src/UI/Panels/SavePannel.tscn" id="4_q7typ"]
[node name="MainMenu" type="Control" unique_id=285750365]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_wrf65")
[node name="BG" type="TextureRect" parent="." unique_id=1279813992]
layout_mode = 1
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
texture = ExtResource("1_hrti0")
expand_mode = 2
[node name="Menu" type="CenterContainer" parent="." unique_id=684900922]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="Menu" unique_id=313362564]
custom_minimum_size = Vector2(400, 0)
layout_mode = 2
alignment = 1
[node name="ButtonNewGame" type="Button" parent="Menu/VBoxContainer" unique_id=1170524877]
layout_mode = 2
size_flags_vertical = 3
theme = ExtResource("2_cwvg5")
text = "新游戏"
[node name="ButtonLoadGame" type="Button" parent="Menu/VBoxContainer" unique_id=145977970]
layout_mode = 2
size_flags_vertical = 3
theme = ExtResource("2_cwvg5")
text = "加载游戏"
[node name="ButtonSettings" type="Button" parent="Menu/VBoxContainer" unique_id=1526312497]
layout_mode = 2
size_flags_vertical = 3
theme = ExtResource("2_cwvg5")
text = "设置"
[node name="ButtonExit" type="Button" parent="Menu/VBoxContainer" unique_id=1558322531]
layout_mode = 2
size_flags_vertical = 3
theme = ExtResource("2_cwvg5")
text = "退出"
[node name="SavePannel" parent="." unique_id=1536921001 instance=ExtResource("4_q7typ")]
visible = false
layout_mode = 1
[connection signal="button_up" from="Menu/VBoxContainer/ButtonNewGame" to="." method="_on_MainMenu_NewGame_ButtonUp"]
[connection signal="button_up" from="Menu/VBoxContainer/ButtonLoadGame" to="." method="_on_MainMenu_LoadGame_ButtonUp"]
[connection signal="button_up" from="Menu/VBoxContainer/ButtonSettings" to="." method="_on_MainMenu_Settings_ButtonUp"]
[connection signal="button_up" from="Menu/VBoxContainer/ButtonExit" to="." method="_on_MainMenu_Exit_ButtonUp"]
[connection signal="save_panel_esc_pressed" from="SavePannel" to="." method="_on_SavePannel_Esc_pressed"]
+33
View File
@@ -0,0 +1,33 @@
## 存档面板(挂载于 SavePanel.tscn)。
## 两级浏览:左侧存档组列表 → 右侧该组槽位列表。
## 存档模式(游戏内):点"新建存档"每次创建新槽位;读档模式(主菜单):点槽位读档。
extends Panel
## 面板模式。
enum Mode { SAVE, LOAD }
## 请求关闭面板(返回上级界面)。
signal save_panel_esc_pressed
## 槽位条目场景。
const SAVE_SLOT_SCENE := preload("res://src/UI/Panels/SaveSlot.tscn")
#@onready var title_label: Label = %TitleLabel
#@onready var group_container: VBoxContainer = %GroupContainer
#@onready var slot_list: VBoxContainer = %SlotList
#@onready var new_slot_button: Button = %Button_NewSlot
## 当前模式。
var mode: Mode = Mode.LOAD
## 当前浏览的存档组 ID。
#var _current_profile: int = 0
### 打开面板前的暂停状态(存档模式关闭时恢复)。
#var _was_paused := false
func _on_SavePanel_Esc_ButtonUp() -> void:
save_panel_esc_pressed.emit()
pass # Replace with function body.
func _on_SavePanel_NewSlot_ButtonUp() -> void:
pass # Replace with function body.
+1
View File
@@ -0,0 +1 @@
uid://dhh02xtieoq2s
+72
View File
@@ -0,0 +1,72 @@
[gd_scene format=3 uid="uid://cqdytnp2v07v"]
[ext_resource type="Script" uid="uid://dhh02xtieoq2s" path="res://src/UI/Panels/SavePannel.gd" id="1_lyly3"]
[ext_resource type="Theme" uid="uid://btnjeju2d47x8" path="res://resources/save_menu_button_theme.tres" id="2_bgsuy"]
[ext_resource type="LabelSettings" uid="uid://bn06sljdiloor" path="res://resources/save_menu_label_settings.tres" id="2_i6d4q"]
[node name="SavePannel" type="Panel" unique_id=1536921001]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_lyly3")
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=56335316]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=718817298]
layout_mode = 2
size_flags_vertical = 3
[node name="TitleLabel" type="Label" parent="VBoxContainer/HBoxContainer" unique_id=2128647553]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
text = "选择存档"
label_settings = ExtResource("2_i6d4q")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Spacer" type="Control" parent="VBoxContainer/HBoxContainer" unique_id=187185831]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 5.0
[node name="Button_NewSlot" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=657984753]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("2_bgsuy")
text = "新建存档"
[node name="Button_Esc" type="Button" parent="VBoxContainer/HBoxContainer" unique_id=272892241]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("2_bgsuy")
text = "返回"
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer" unique_id=520657017]
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 15.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ScrollContainer" unique_id=1858690088]
layout_mode = 2
[node name="GroupContainer" type="VBoxContainer" parent="VBoxContainer/ScrollContainer/HBoxContainer" unique_id=1215509679]
unique_name_in_owner = true
layout_mode = 2
[node name="SaveSlotList" type="VBoxContainer" parent="VBoxContainer/ScrollContainer/HBoxContainer" unique_id=1157397953]
unique_name_in_owner = true
layout_mode = 2
[connection signal="button_up" from="VBoxContainer/HBoxContainer/Button_NewSlot" to="." method="_on_SavePanel_NewSlot_ButtonUp"]
[connection signal="button_up" from="VBoxContainer/HBoxContainer/Button_Esc" to="." method="_on_SavePanel_Esc_ButtonUp"]
+1
View File
@@ -0,0 +1 @@
extends Panel
+1
View File
@@ -0,0 +1 @@
uid://b3kck4qod545u
+55
View File
@@ -0,0 +1,55 @@
[gd_scene format=3 uid="uid://d1fw0ofrshjir"]
[ext_resource type="Script" uid="uid://b3kck4qod545u" path="res://src/UI/Panels/SaveSlot.gd" id="1_gsy4a"]
[ext_resource type="LabelSettings" uid="uid://bn06sljdiloor" path="res://resources/save_menu_label_settings.tres" id="2_lm8et"]
[ext_resource type="Theme" uid="uid://btnjeju2d47x8" path="res://resources/save_menu_button_theme.tres" id="2_m8lv8"]
[node name="SaveSlot" type="Panel" unique_id=815772812]
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_gsy4a")
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=1394744552]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="SlotIndexLabel" type="Label" parent="HBoxContainer" unique_id=1779842797]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
label_settings = ExtResource("2_lm8et")
horizontal_alignment = 1
vertical_alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer" unique_id=1166688104]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 15.0
[node name="SaveNameLabel" type="Label" parent="HBoxContainer/VBoxContainer" unique_id=391910928]
layout_mode = 2
size_flags_vertical = 3
[node name="SaveSlotInfo" type="Label" parent="HBoxContainer/VBoxContainer" unique_id=125642674]
layout_mode = 2
size_flags_vertical = 3
[node name="ButtonDelete" type="Button" parent="HBoxContainer" unique_id=250829961]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("2_m8lv8")
text = "删除"
[node name="ButtonLoad" type="Button" parent="HBoxContainer" unique_id=1197277104]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("2_m8lv8")
text = "▶"