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

129
scenes/CraftingItem.tscn Normal file
View File

@ -0,0 +1,129 @@
[gd_scene load_steps=3 format=3 uid="uid://bod88mt8ewq2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
bg_color = Color(0.12, 0.15, 0.18, 0.95)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.25, 0.35, 0.45, 0.8)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
shadow_color = Color(0, 0, 0, 0.4)
shadow_size = 3
shadow_offset = Vector2(1, 2)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2"]
content_margin_left = 2.0
content_margin_top = 2.0
content_margin_right = 2.0
content_margin_bottom = 2.0
bg_color = Color(0.2, 0.2, 0.2, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.4, 0.4, 0.4, 1)
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[node name="CraftingItem" type="Panel"]
custom_minimum_size = Vector2(220, 52)
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 6
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 6
theme_override_constants/margin_bottom = 4
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="IconTexture" type="TextureRect" parent="MarginContainer/HBoxContainer"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="MiddleContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 2
[node name="NameLabel" type="Label" parent="MarginContainer/HBoxContainer/MiddleContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "物品名称"
vertical_alignment = 1
[node name="MaterialsLabel" type="Label" parent="MarginContainer/HBoxContainer/MiddleContainer"]
modulate = Color(0.7, 0.7, 0.7, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "材料: 1x铁矿"
[node name="InfoRow" type="HBoxContainer" parent="MarginContainer/HBoxContainer/MiddleContainer"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="CraftTimeLabel" type="Label" parent="MarginContainer/HBoxContainer/MiddleContainer/InfoRow"]
modulate = Color(0.8, 0.9, 1, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "1.0s"
[node name="MethodLabel" type="Label" parent="MarginContainer/HBoxContainer/MiddleContainer/InfoRow"]
modulate = Color(1, 0.9, 0.7, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "手动"
[node name="RightContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
[node name="CraftButton" type="Button" parent="MarginContainer/HBoxContainer/RightContainer"]
custom_minimum_size = Vector2(48, 20)
layout_mode = 2
size_flags_vertical = 4
theme_override_font_sizes/font_size = 9
text = "合成"
[node name="QuantityContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/RightContainer"]
layout_mode = 2
theme_override_constants/separation = 1
[node name="MinusButton" type="Button" parent="MarginContainer/HBoxContainer/RightContainer/QuantityContainer"]
custom_minimum_size = Vector2(18, 16)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "-"
[node name="QuantityInput" type="LineEdit" parent="MarginContainer/HBoxContainer/RightContainer/QuantityContainer"]
custom_minimum_size = Vector2(20, 16)
layout_mode = 2
theme_override_constants/minimum_character_width = 0
theme_override_font_sizes/font_size = 8
theme_override_styles/focus = SubResource("StyleBoxFlat_2")
theme_override_styles/normal = SubResource("StyleBoxFlat_2")
text = "1"
placeholder_text = "1"
alignment = 1
context_menu_enabled = false
[node name="PlusButton" type="Button" parent="MarginContainer/HBoxContainer/RightContainer/QuantityContainer"]
custom_minimum_size = Vector2(18, 16)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "+"

69
scenes/CraftingQueue.tscn Normal file
View File

@ -0,0 +1,69 @@
[gd_scene load_steps=2 format=3 uid="uid://bvn8xh2ywxe"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
bg_color = Color(0.15, 0.15, 0.2, 0.8)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.3, 0.3, 0.4, 0.6)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[node name="CraftingQueue" type="Panel"]
custom_minimum_size = Vector2(0, 80)
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 8
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="TitleLabel" type="Label" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "合成队列"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 12
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="QueueContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 4
[node name="Slot1" type="Panel" parent="MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot2" type="Panel" parent="MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot3" type="Panel" parent="MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot4" type="Panel" parent="MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot5" type="Panel" parent="MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_horizontal = 3

64
scenes/InventoryItem.tscn Normal file
View File

@ -0,0 +1,64 @@
[gd_scene load_steps=2 format=3 uid="uid://b3sb2a63y77ra"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
bg_color = Color(0.2, 0.2, 0.2, 0.8)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[node name="InventoryItem" type="Control"]
custom_minimum_size = Vector2(0, 35)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
[node name="Background" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 6
theme_override_constants/margin_top = 3
theme_override_constants/margin_right = 6
theme_override_constants/margin_bottom = 3
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 6
[node name="IconTexture" type="TextureRect" parent="MarginContainer/HBoxContainer"]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="NameLabel" type="Label" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 11
text = "物品名称"
vertical_alignment = 1
[node name="QuantityLabel" type="Label" parent="MarginContainer/HBoxContainer"]
custom_minimum_size = Vector2(30, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 11
text = "999"
horizontal_alignment = 2
vertical_alignment = 1

127
scenes/ItemPanel.tscn Normal file
View File

@ -0,0 +1,127 @@
[gd_scene load_steps=3 format=3 uid="uid://cihq67dbb8q7m"]
[ext_resource type="Texture2D" uid="uid://x8myw44ubs8k" path="res://assets/textures/PixPin_2025-06-15_11-35-40.png" id="1_1w476"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
bg_color = Color(0.15, 0.15, 0.2, 0.95)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.3, 0.3, 0.4, 0.8)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
shadow_color = Color(0, 0, 0, 0.3)
shadow_size = 2
shadow_offset = Vector2(1, 1)
[node name="ItemPanel" type="Panel"]
custom_minimum_size = Vector2(250, 64)
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 4
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="TopRow" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="IconTexture" type="TextureRect" parent="MarginContainer/VBoxContainer/TopRow"]
custom_minimum_size = Vector2(36, 36)
layout_mode = 2
texture = ExtResource("1_1w476")
expand_mode = 1
stretch_mode = 5
[node name="MiddleContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TopRow"]
layout_mode = 2
size_flags_horizontal = 3
[node name="TopInfoRow" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TopRow/MiddleContainer"]
layout_mode = 2
[node name="NameLabel" type="Label" parent="MarginContainer/VBoxContainer/TopRow/MiddleContainer/TopInfoRow"]
layout_mode = 2
theme_override_font_sizes/font_size = 11
text = "物品名称"
[node name="ProductionLabel" type="Label" parent="MarginContainer/VBoxContainer/TopRow/MiddleContainer/TopInfoRow"]
modulate = Color(0.8, 0.8, 0.8, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 9
text = "50/s"
[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/TopRow/MiddleContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="RightContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TopRow"]
layout_mode = 2
[node name="PowerLabel" type="Label" parent="MarginContainer/VBoxContainer/TopRow/RightContainer"]
modulate = Color(1, 0.8, 0.8, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "-300W"
horizontal_alignment = 2
[node name="RightSpacer" type="Control" parent="MarginContainer/VBoxContainer/TopRow/RightContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="BottomDeviceRow" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TopRow/RightContainer"]
layout_mode = 2
[node name="MinusButton" type="Button" parent="MarginContainer/VBoxContainer/TopRow/RightContainer/BottomDeviceRow"]
custom_minimum_size = Vector2(16, 16)
layout_mode = 2
theme_override_font_sizes/font_size = 10
text = "-"
[node name="DeviceLabel" type="Label" parent="MarginContainer/VBoxContainer/TopRow/RightContainer/BottomDeviceRow"]
modulate = Color(0.7, 0.7, 0.7, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 8
text = "设备: 5"
[node name="PlusButton" type="Button" parent="MarginContainer/VBoxContainer/TopRow/RightContainer/BottomDeviceRow"]
custom_minimum_size = Vector2(16, 16)
layout_mode = 2
theme_override_font_sizes/font_size = 10
text = "+"
[node name="ProgressContainer" type="Control" parent="MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 5)
layout_mode = 2
size_flags_vertical = 0
[node name="ProgressBackground" type="ColorRect" parent="MarginContainer/VBoxContainer/ProgressContainer"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.2, 0.2, 0.2, 1)
[node name="ProgressFill" type="ColorRect" parent="MarginContainer/VBoxContainer/ProgressContainer"]
layout_mode = 1
anchors_preset = -1
anchor_right = 0.65
anchor_bottom = 1.0
grow_vertical = 2
color = Color(0.3, 0.7, 0.3, 1)

228
scenes/game_scene.tscn Normal file
View File

@ -0,0 +1,228 @@
[gd_scene load_steps=5 format=3 uid="uid://bw51wdor6ucmk"]
[ext_resource type="Script" path="res://scripts/core/GameScene.cs" id="1_2k4vx"]
[ext_resource type="Script" path="res://scripts/ui/DynamicTabManager.cs" id="2_3k5vy"]
[ext_resource type="Script" path="res://scripts/inventory/InventoryTableManager.cs" id="3_inventory_table"]
[ext_resource type="Script" path="res://scripts/production/CraftingQueueManager.cs" id="4_crafting_queue"]
[node name="GameScene" 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_2k4vx")
[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.1, 0.1, 0.15, 1)
[node name="HSplitContainer" type="HSplitContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
split_offset = 230
[node name="LeftPanel" type="Panel" parent="HSplitContainer"]
custom_minimum_size = Vector2(276, 0)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/LeftPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PowerInfo" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer"]
layout_mode = 2
[node name="PowerTitle" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "电力系统"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="PowerRow1" type="HBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="PowerGeneration" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer/PowerRow1"]
layout_mode = 2
size_flags_horizontal = 3
text = "发电: 0 KW"
[node name="PowerConsumption" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer/PowerRow1"]
layout_mode = 2
size_flags_horizontal = 3
text = "耗电: 0 KW"
[node name="PowerRow2" type="HBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="PowerStorage" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer/PowerRow2"]
layout_mode = 2
size_flags_horizontal = 3
text = "蓄电: 0 KWh"
[node name="PowerDischarge" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer/PowerRow2"]
layout_mode = 2
size_flags_horizontal = 3
text = "放电: 0 KW"
[node name="CraftingQueue" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 80)
layout_mode = 2
script = ExtResource("4_crafting_queue")
[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 8
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer"]
layout_mode = 2
[node name="TitleLabel" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "合成队列"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="QueueContainer" type="HBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 2
[node name="Slot1" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot2" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot3" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot4" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot5" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot6" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot7" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Slot8" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer/QueueContainer"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="InventoryPanel" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer"]
layout_mode = 2
[node name="InventoryTitle" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "库存"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
horizontal_scroll_mode = 0
[node name="InventoryTableManager" type="VBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("3_inventory_table")
[node name="RightPanel" type="Panel" parent="HSplitContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/RightPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CategoryTabs" type="TabContainer" parent="HSplitContainer/RightPanel/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 24
script = ExtResource("2_3k5vy")

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"]

64
scenes/ss Normal file
View File

@ -0,0 +1,64 @@
[gd_scene format=3]
[node name="ItemPanel" type="Panel"]
custom_minimum_size = Vector2(320, 60)
[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
[node name="Icon" type="TextureRect" parent="HBoxContainer"]
custom_minimum_size = Vector2(48, 48)
expand = true
stretch_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
[node name="TopRow" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
[node name="NameLabel" type="Label" parent="HBoxContainer/VBoxContainer/TopRow"]
text = "物品名称 50/s"
custom_colors/font_color = Color(1, 0.85, 0.3)
theme_override_font_sizes/font_size = 18
[node name="PowerIcon" type="TextureRect" parent="HBoxContainer/VBoxContainer/TopRow"]
custom_minimum_size = Vector2(20, 20)
expand = false
stretch_mode = 2
[node name="PowerLabel" type="Label" parent="HBoxContainer/VBoxContainer/TopRow"]
text = "-360.0W"
custom_colors/font_color = Color(0.7, 0.9, 1)
theme_override_font_sizes/font_size = 14
[node name="RecipeRow" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
[node name="EqualIcon" type="TextureRect" parent="HBoxContainer/VBoxContainer/RecipeRow"]
custom_minimum_size = Vector2(16, 16)
expand = false
stretch_mode = 2
[node name="MaterialIcon" type="TextureRect" parent="HBoxContainer/VBoxContainer/RecipeRow"]
custom_minimum_size = Vector2(32, 32)
expand = false
stretch_mode = 2
[node name="ControlRow" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
[node name="MinusButton" type="Button" parent="HBoxContainer/VBoxContainer/ControlRow"]
text = "-"
custom_minimum_size = Vector2(32, 32)
[node name="CountEdit" type="LineEdit" parent="HBoxContainer/VBoxContainer/ControlRow"]
text = "50"
custom_minimum_size = Vector2(48, 32)
[node name="PlusButton" type="Button" parent="HBoxContainer/VBoxContainer/ControlRow"]
text = "+"
custom_minimum_size = Vector2(32, 32)
[node name="ProgressBar" type="ProgressBar" parent="HBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2(200, 8)
value = 50
max_value = 100

26
scenes/test.tscn Normal file
View File

@ -0,0 +1,26 @@
[gd_scene format=3 uid="uid://b8kwq742j0g41"]
[node name="Test" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 0
offset_right = 183.0
offset_bottom = 40.0
alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "test"
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3