Browse Source

Update the inventory look

pull/4/head
Ryan Reed 1 month ago
parent
commit
d0db4198f9
4 changed files with 30 additions and 20 deletions
  1. +12
    -5
      scenes/ui/inventory/inventory.tscn
  2. +2
    -3
      scenes/ui/inventory/item_rect.gd
  3. +15
    -11
      scenes/ui/inventory/item_rect.tscn
  4. +1
    -1
      scenes/ui/options_menu.tscn

+ 12
- 5
scenes/ui/inventory/inventory.tscn View File

@ -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

+ 2
- 3
scenes/ui/inventory/item_rect.gd View File

@ -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:


+ 15
- 11
scenes/ui/inventory/item_rect.tscn View File

@ -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")

+ 1
- 1
scenes/ui/options_menu.tscn View File

@ -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


Loading…
Cancel
Save