Added icon to slot

This commit is contained in:
cblech
2025-05-20 19:48:49 +02:00
parent 60928c520c
commit 8fdb395ae8
10 changed files with 90 additions and 28 deletions
+17 -2
View File
@@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://c0kmdjeqkqrwv"]
[gd_scene load_steps=5 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://0p52bm8b1nrl" path="res://art/ui/UI/inventory_standard.png" id="2_7emux"]
[ext_resource type="Texture2D" uid="uid://cfxibry711o16" path="res://art/ui/UI/icons/icon-scythe.png" id="3_n5ryf"]
[sub_resource type="LabelSettings" id="LabelSettings_7emux"]
font_size = 15
@@ -15,7 +16,7 @@ offset_right = 100.0
offset_bottom = 100.0
script = ExtResource("1_au0l0")
[node name="TextureRect" type="TextureRect" parent="."]
[node name="SlotBackground" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -57,4 +58,18 @@ theme_override_colors/font_color = Color(0, 0, 0, 1)
text = "999"
horizontal_alignment = 2
[node name="Icon" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 10.0
offset_top = 10.0
offset_right = -10.0
offset_bottom = -10.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_n5ryf")
expand_mode = 1
[connection signal="gui_input" from="." to="." method="_on_gui_input"]