Added inventory display and item display.

This commit is contained in:
=
2026-05-05 20:44:06 +02:00
parent abeb8c0902
commit ffe1077abc
14 changed files with 184 additions and 11 deletions
+13 -2
View File
@@ -11,7 +11,9 @@
[ext_resource type="Texture2D" uid="uid://deuxffyhsrinn" path="res://Assets/Images/EnergySymbol.png" id="9_71axn"]
[ext_resource type="Texture2D" uid="uid://dje86ro2e37xl" path="res://Assets/Images/Resources/WaterSymbol.png" id="10_71axn"]
[ext_resource type="Texture2D" uid="uid://d068gyi3e48cv" path="res://Assets/Images/MapSymbol.png" id="11_3cx6b"]
[ext_resource type="Script" uid="uid://com0u7nqag6pp" path="res://Scripts/Crafting/InventoryDisplay.cs" id="11_acvyw"]
[ext_resource type="Texture2D" uid="uid://ban872p4eh4gi" path="res://Assets/Images/RobotSymbol.png" id="11_dahhg"]
[ext_resource type="Texture2D" uid="uid://ciehcg34et0q3" path="res://Assets/Images/InventorySymbol.png" id="11_wxwew"]
[ext_resource type="Texture2D" uid="uid://b77mo4fhklnja" path="res://Assets/Images/OptionsSymbol.png" id="12_3so38"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_u44n3"]
@@ -62,7 +64,7 @@ environment = SubResource("Environment_sb48q")
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1558432386]
follow_viewport_enabled = true
[node name="UIHandler" type="Control" parent="CanvasLayer" unique_id=1713248285 node_paths=PackedStringArray("codingWindow", "robotList", "mainCam", "map", "FPS", "RAM", "options", "uiContent", "menu")]
[node name="UIHandler" type="Control" parent="CanvasLayer" unique_id=1713248285 node_paths=PackedStringArray("codingWindow", "robotList", "mainCam", "map", "FPS", "RAM", "options", "uiContent", "menu", "inventory")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -83,6 +85,7 @@ RAM = NodePath("MainUI/FooterContainer/HBoxContainer/RAM")
options = NodePath("MainUI/Content/Options")
uiContent = NodePath("MainUI/Content")
menu = NodePath("MainUI/Content/Menu")
inventory = NodePath("MainUI/Content/Inventory")
[node name="MainUI" type="VBoxContainer" parent="CanvasLayer/UIHandler" unique_id=1437975209]
layout_mode = 1
@@ -353,7 +356,7 @@ text = "Exit"
visible = false
layout_mode = 1
[node name="Inventory" type="PanelContainer" parent="CanvasLayer/UIHandler/MainUI/Content" unique_id=407422598]
[node name="Inventory" type="PanelContainer" parent="CanvasLayer/UIHandler/MainUI/Content" unique_id=407422598 node_paths=PackedStringArray("itemList")]
visible = false
layout_mode = 1
anchors_preset = 11
@@ -363,6 +366,8 @@ anchor_bottom = 1.0
offset_left = -525.0
grow_horizontal = 0
grow_vertical = 2
script = ExtResource("11_acvyw")
itemList = NodePath("VBoxContainer/ScrollContainer/VBoxContainer")
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/UIHandler/MainUI/Content/Inventory" unique_id=1776118554]
layout_mode = 2
@@ -405,6 +410,11 @@ layout_mode = 2
fit_content = true
autowrap_mode = 0
[node name="Inventory" type="TextureButton" parent="CanvasLayer/UIHandler/MainUI/FooterContainer/HBoxContainer" unique_id=1598826377]
layout_mode = 2
tooltip_text = "Map (M)"
texture_normal = ExtResource("11_wxwew")
[node name="Map" type="TextureButton" parent="CanvasLayer/UIHandler/MainUI/FooterContainer/HBoxContainer" unique_id=1320346210]
layout_mode = 2
tooltip_text = "Map (M)"
@@ -425,6 +435,7 @@ texture_normal = ExtResource("12_3so38")
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/Content/Menu/VBoxContainer/Button" to="CanvasLayer/UIHandler" method="HandleMenu"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/Content/Menu/VBoxContainer/Button2" to="CanvasLayer/UIHandler" method="ShowOptions"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/Content/Menu/VBoxContainer/Button3" to="CanvasLayer/UIHandler" method="ExitGame"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/FooterContainer/HBoxContainer/Inventory" to="CanvasLayer/UIHandler" method="HandleInventoryButton"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/FooterContainer/HBoxContainer/Map" to="CanvasLayer/UIHandler" method="HandleMapButton"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/FooterContainer/HBoxContainer/Robots" to="CanvasLayer/UIHandler" method="HandleRobotListButton"]
[connection signal="pressed" from="CanvasLayer/UIHandler/MainUI/FooterContainer/HBoxContainer/Options" to="CanvasLayer/UIHandler" method="HandleMenuButton"]