生产线样式,添加图标测试

This commit is contained in:
2025-06-19 00:02:41 +08:00
parent 50dc434ed9
commit b3d1135e23
23 changed files with 868 additions and 384 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://bvn8xh2ywxe"]
[gd_scene load_steps=2 format=3 uid="uid://buswnr7ncyh4c"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
bg_color = Color(0.15, 0.15, 0.2, 0.8)
@ -21,6 +21,8 @@ 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
@ -31,9 +33,9 @@ layout_mode = 2
[node name="TitleLabel" type="Label" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "合成队列"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 12
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
@ -66,4 +68,4 @@ 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
size_flags_horizontal = 3

View File

@ -0,0 +1,89 @@
[gd_scene load_steps=3 format=3 uid="uid://dai5u7qk43gp6"]
[ext_resource type="Script" path="res://scripts/ui/ManualCollectionItem.cs" id="1_x7y8z"]
[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.2, 0.5, 0.2, 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.2)
shadow_size = 1
shadow_offset = Vector2(1, 1)
[node name="ManualCollectionItem" type="Panel"]
custom_minimum_size = Vector2(130, 43)
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
script = ExtResource("1_x7y8z")
[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
theme_override_constants/separation = 3
[node name="TopRow" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 5
[node name="IconTexture" type="TextureRect" parent="MarginContainer/VBoxContainer/TopRow"]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="InfoContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TopRow"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 0
[node name="NameLabel" type="Label" parent="MarginContainer/VBoxContainer/TopRow/InfoContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.9, 1, 0.9, 1)
theme_override_font_sizes/font_size = 10
text = "物品名称"
vertical_alignment = 1
[node name="StatusLabel" type="Label" parent="MarginContainer/VBoxContainer/TopRow/InfoContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.7, 0.9, 0.7, 1)
theme_override_font_sizes/font_size = 8
text = "点击采集"
vertical_alignment = 1
[node name="ProgressContainer" type="Control" parent="MarginContainer/VBoxContainer"]
visible = false
custom_minimum_size = Vector2(0, 4)
layout_mode = 2
[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.15, 0.15, 0.15, 0.8)
[node name="ProgressFill" type="ColorRect" parent="MarginContainer/VBoxContainer/ProgressContainer"]
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
grow_vertical = 2
color = Color(0.3, 0.8, 0.3, 1)

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://vao0wv2oib2a"]
[gd_scene load_steps=5 format=3 uid="uid://vao0wv2oib2a"]
[ext_resource type="Script" path="res://scripts/ui/ProductionLineItem.cs" id="1_1"]
[ext_resource type="Texture2D" uid="uid://dqu31gnodu6dx" path="res://assets/textures/Vanilla.png" id="2_o1rrk"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
bg_color = Color(0.15, 0.18, 0.22, 0.95)
@ -17,8 +18,12 @@ shadow_color = Color(0, 0, 0, 0.3)
shadow_size = 2
shadow_offset = Vector2(1, 1)
[sub_resource type="AtlasTexture" id="AtlasTexture_cln0n"]
atlas = ExtResource("2_o1rrk")
region = Rect2(720, 640, 80, 80)
[node name="ProductionLineItem" type="Panel"]
custom_minimum_size = Vector2(240, 80)
custom_minimum_size = Vector2(250, 60)
theme_override_styles/panel = SubResource("StyleBoxFlat_1")
script = ExtResource("1_1")
@ -45,6 +50,7 @@ theme_override_constants/separation = 8
[node name="IconTexture" type="TextureRect" parent="MarginContainer/VBoxContainer/TopRow"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
texture = SubResource("AtlasTexture_cln0n")
expand_mode = 1
stretch_mode = 5

View File

@ -21,22 +21,21 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.1, 0.1, 0.15, 1)
color = Color(0.670588, 0.756863, 1, 0.392157)
[node name="HSplitContainer" type="HSplitContainer" parent="."]
[node name="HBoxContainer" type="HBoxContainer" 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)
[node name="LeftPanel" type="Panel" parent="HBoxContainer"]
custom_minimum_size = Vector2(280, 0)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/LeftPanel"]
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/LeftPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -44,11 +43,11 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PowerInfo" type="Panel" parent="HSplitContainer/LeftPanel/VBoxContainer"]
[node name="PowerInfo" type="Panel" parent="HBoxContainer/LeftPanel/VBoxContainer"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo"]
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/LeftPanel/VBoxContainer/PowerInfo"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -60,51 +59,51 @@ 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"]
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer"]
layout_mode = 2
[node name="PowerTitle" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
[node name="PowerTitle" type="Label" parent="HBoxContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "电力系统"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
[node name="HSeparator" type="HSeparator" parent="HBoxContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="PowerRow1" type="HBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/PowerInfo/MarginContainer/VBoxContainer"]
[node name="PowerRow1" type="HBoxContainer" parent="HBoxContainer/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"]
[node name="PowerGeneration" type="Label" parent="HBoxContainer/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"]
[node name="PowerConsumption" type="Label" parent="HBoxContainer/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"]
[node name="PowerRow2" type="HBoxContainer" parent="HBoxContainer/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"]
[node name="PowerStorage" type="Label" parent="HBoxContainer/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"]
[node name="PowerDischarge" type="Label" parent="HBoxContainer/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"]
[node name="CraftingQueue" type="Panel" parent="HBoxContainer/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"]
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/LeftPanel/VBoxContainer/CraftingQueue"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -116,68 +115,60 @@ 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"]
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer"]
layout_mode = 2
[node name="TitleLabel" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer"]
[node name="TitleLabel" type="Label" parent="HBoxContainer/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"]
[node name="HSeparator" type="HSeparator" parent="HBoxContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="QueueContainer" type="HBoxContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/CraftingQueue/MarginContainer/VBoxContainer"]
[node name="QueueContainer" type="HBoxContainer" parent="HBoxContainer/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"]
[node name="Slot1" type="Panel" parent="HBoxContainer/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"]
[node name="Slot2" type="Panel" parent="HBoxContainer/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"]
[node name="Slot3" type="Panel" parent="HBoxContainer/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"]
[node name="Slot4" type="Panel" parent="HBoxContainer/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"]
[node name="Slot5" type="Panel" parent="HBoxContainer/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"]
[node name="Slot6" type="Panel" parent="HBoxContainer/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"]
[node name="Slot7" type="Panel" parent="HBoxContainer/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"]
[node name="Slot8" type="Panel" parent="HBoxContainer/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"]
[node name="InventoryPanel" type="Panel" parent="HBoxContainer/LeftPanel/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel"]
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/LeftPanel/VBoxContainer/InventoryPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -189,31 +180,32 @@ 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"]
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer"]
layout_mode = 2
[node name="InventoryTitle" type="Label" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
[node name="InventoryTitle" type="Label" parent="HBoxContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "库存"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
[node name="HSeparator" type="HSeparator" parent="HBoxContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="HSplitContainer/LeftPanel/VBoxContainer/InventoryPanel/MarginContainer/VBoxContainer"]
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/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"]
[node name="InventoryTableManager" type="VBoxContainer" parent="HBoxContainer/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"]
[node name="RightPanel" type="Panel" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/RightPanel"]
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/RightPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@ -221,7 +213,7 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CategoryTabs" type="TabContainer" parent="HSplitContainer/RightPanel/VBoxContainer"]
[node name="CategoryTabs" type="TabContainer" parent="HBoxContainer/RightPanel/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 24

View File

@ -24,3 +24,11 @@ text = "test"
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="ScrollContainer" type="ScrollContainer" parent="."]
layout_mode = 0
offset_left = 52.0
offset_top = 53.0
offset_right = 432.0
offset_bottom = 342.0
metadata/asd = false