Browse Source

Updating look of inventory slightly

pull/4/head
Ryan Reed 1 month ago
parent
commit
b4264bfa50
3 changed files with 8 additions and 9 deletions
  1. +2
    -2
      scenes/ui/inventory/inventory.tscn
  2. +1
    -1
      scenes/ui/inventory/item_rect.gd
  3. +5
    -6
      scenes/ui/inventory/item_rect.tscn

+ 2
- 2
scenes/ui/inventory/inventory.tscn View File

@ -42,6 +42,6 @@ layout_mode = 2
[node name="GridContainer" type="GridContainer" parent="Background/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/h_separation = 256
theme_override_constants/v_separation = 256
theme_override_constants/h_separation = 20
theme_override_constants/v_separation = 20
columns = 4

+ 1
- 1
scenes/ui/inventory/item_rect.gd View File

@ -11,7 +11,7 @@ extends Panel
func update_rect() -> void:
item_texture.texture = load(item_resource.item_texture)
amount_label.text = "x" + str(item_resource.amount)
tooltip_text = item_resource.name
tooltip_text = item_resource.name + "\n" + item_resource.description
func on_stack_full(is_full: bool) -> void:


+ 5
- 6
scenes/ui/inventory/item_rect.tscn View File

@ -4,6 +4,7 @@
[ext_resource type="Script" uid="uid://cknl6i0jce5jr" path="res://scenes/ui/inventory/item_rect.gd" id="1_oderi"]
[node name="ItemRect" type="Panel"]
custom_minimum_size = Vector2(128, 128)
anchors_preset = -1
anchor_right = 0.111111
anchor_bottom = 0.197531
@ -13,13 +14,11 @@ script = ExtResource("1_oderi")
metadata/_edit_use_anchors_ = true
[node name="ItemTexture" type="TextureRect" parent="."]
texture_filter = 1
custom_minimum_size = Vector2(64, 64)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
layout_mode = 0
offset_right = 128.0
offset_bottom = 128.0
texture = ExtResource("1_o0kom")
stretch_mode = 4


Loading…
Cancel
Save