Move items

This commit is contained in:
cblech
2025-04-07 02:10:59 +02:00
parent 959ab68b4d
commit c90687939c
18 changed files with 235 additions and 15 deletions
+28 -3
View File
@@ -1,8 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://cgjc4wurbgimy"]
[gd_scene load_steps=4 format=3 uid="uid://cgjc4wurbgimy"]
[ext_resource type="Script" uid="uid://b7vlkecrn0t5c" path="res://scripts/CSharp/Common/Inventory/InventoryUI.cs" id="1_6wusm"]
[ext_resource type="Script" uid="uid://b7vlkecrn0t5c" path="res://scripts/CSharp/Common/Inventory/InventoryUi.cs" id="1_6wusm"]
[ext_resource type="Script" uid="uid://b2jhdxcrhtm2d" path="res://scripts/CSharp/Common/Inventory/InventoryTestScript.cs" id="3_exrk4"]
[ext_resource type="Resource" uid="uid://datee0flk1e84" path="res://resources/items/pickaxe.tres" id="4_5fdxq"]
[node name="Inventory" type="Control"]
layout_mode = 3
anchors_preset = 0
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_6wusm")
[node name="Slots" type="GridContainer" parent="."]
custom_minimum_size = Vector2(500, 200)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -335.0
offset_right = 341.0
offset_bottom = 200.0
grow_horizontal = 2
grow_vertical = 2
columns = 10
[node name="InventoryTester" type="Node" parent="."]
script = ExtResource("3_exrk4")
_testItemToCreate = ExtResource("4_5fdxq")
+44
View File
@@ -0,0 +1,44 @@
[gd_scene load_steps=4 format=3 uid="uid://c0kmdjeqkqrwv"]
[ext_resource type="Script" uid="uid://bh6wcyxh1f0cv" path="res://scripts/CSharp/Common/Inventory/SlotUi.cs" id="1_au0l0"]
[ext_resource type="Texture2D" uid="uid://c2dbd0q02x2h" path="res://graphics/ui/babushka_ui_inventory_slot.png" id="2_7emux"]
[sub_resource type="LabelSettings" id="LabelSettings_7emux"]
font_size = 15
font_color = Color(0.203922, 1, 1, 1)
[node name="Slot" type="Control"]
custom_minimum_size = Vector2(100, 100)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_bottom = 2.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_au0l0")
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_7emux")
expand_mode = 1
stretch_mode = 5
[node name="NameLabel" type="Label" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "asdf"
label_settings = SubResource("LabelSettings_7emux")
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="gui_input" from="." to="." method="_on_gui_input"]