diff --git a/scenes/ui/inventory/inventory.tscn b/scenes/ui/inventory/inventory.tscn index 935e3bb..3870443 100644 --- a/scenes/ui/inventory/inventory.tscn +++ b/scenes/ui/inventory/inventory.tscn @@ -6,10 +6,17 @@ [node name="Inventory" type="Control" node_paths=PackedStringArray("grid_container")] process_mode = 3 +custom_minimum_size = Vector2(860, 400) layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -410.0 +offset_top = -200.0 +offset_right = 410.0 +offset_bottom = 200.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_s6ek7") @@ -42,7 +49,7 @@ layout_mode = 2 [node name="Label" type="Label" parent="Background/MarginContainer/VBoxContainer"] layout_mode = 2 -theme_type_variation = &"HeaderMedium" +theme_type_variation = &"HeaderLarge" text = "Inventory" [node name="GridContainer" type="GridContainer" parent="Background/MarginContainer/VBoxContainer"] @@ -50,4 +57,4 @@ layout_mode = 2 size_flags_vertical = 3 theme_override_constants/h_separation = 20 theme_override_constants/v_separation = 20 -columns = 5 +columns = 10 diff --git a/scenes/ui/inventory/item_rect.gd b/scenes/ui/inventory/item_rect.gd index 0f59057..f6d1199 100644 --- a/scenes/ui/inventory/item_rect.gd +++ b/scenes/ui/inventory/item_rect.gd @@ -2,10 +2,9 @@ class_name InventoryItemRect extends Panel +@export var amount_label: Label @export var item_resource: ItemResource - -@onready var amount_label: Label = $AmountLabel -@onready var item_texture: TextureRect = $ItemTexture +@export var item_texture: TextureRect func update_rect() -> void: diff --git a/scenes/ui/inventory/item_rect.tscn b/scenes/ui/inventory/item_rect.tscn index f6055e7..fe9fb36 100644 --- a/scenes/ui/inventory/item_rect.tscn +++ b/scenes/ui/inventory/item_rect.tscn @@ -1,25 +1,28 @@ -[gd_scene load_steps=3 format=3 uid="uid://boueuk2hnfvg"] +[gd_scene load_steps=4 format=3 uid="uid://boueuk2hnfvg"] [ext_resource type="Texture2D" uid="uid://dknv7amroftm8" path="res://icon.svg" id="1_o0kom"] [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 -grow_horizontal = 2 -grow_vertical = 2 +[sub_resource type="LabelSettings" id="LabelSettings_oderi"] +outline_size = 3 +outline_color = Color(0, 0, 0, 1) + +[node name="ItemRect" type="Panel" node_paths=PackedStringArray("amount_label", "item_texture")] +custom_minimum_size = Vector2(64, 64) +offset_right = 64.0 +offset_bottom = 64.0 script = ExtResource("1_oderi") +amount_label = NodePath("AmountLabel") +item_texture = NodePath("ItemTexture") metadata/_edit_use_anchors_ = true [node name="ItemTexture" type="TextureRect" parent="."] texture_filter = 1 -custom_minimum_size = Vector2(64, 64) layout_mode = 0 -offset_right = 128.0 -offset_bottom = 128.0 +offset_right = 64.0 +offset_bottom = 64.0 texture = ExtResource("1_o0kom") +expand_mode = 1 stretch_mode = 4 [node name="AmountLabel" type="Label" parent="."] @@ -35,3 +38,4 @@ offset_right = -3.0 grow_horizontal = 0 grow_vertical = 0 text = "x100" +label_settings = SubResource("LabelSettings_oderi") diff --git a/scenes/ui/options_menu.tscn b/scenes/ui/options_menu.tscn index 555cb01..9a8fd08 100644 --- a/scenes/ui/options_menu.tscn +++ b/scenes/ui/options_menu.tscn @@ -27,7 +27,7 @@ size_flags_horizontal = 3 [node name="Label" type="Label" parent="PanelContainer/MarginContainer/LeftContainer/VBoxContainer"] layout_mode = 2 size_flags_vertical = 0 -theme_type_variation = &"HeaderMedium" +theme_type_variation = &"HeaderLarge" text = "Options Menu" horizontal_alignment = 1