[gd_scene load_steps=14 format=3 uid="uid://cn7tgd4y67wnd"]

[ext_resource type="Script" uid="uid://qvoqvonnxwfc" path="res://src/inventory_ui.gd" id="1_a0rpf"]
[ext_resource type="Script" uid="uid://bx4wxlm5mv268" path="res://src/root_control.gd" id="1_as33y"]
[ext_resource type="Theme" uid="uid://bb6tvyqikcf3r" path="res://scenes/box_ui.tres" id="1_sr8g6"]
[ext_resource type="Resource" uid="uid://bllq6ri54q3ne" path="res://resources/player_inventory.tres" id="2_as33y"]
[ext_resource type="PackedScene" uid="uid://gn8k2ir47n1m" path="res://scenes/inventory_item.tscn" id="3_tg4gd"]
[ext_resource type="Script" uid="uid://bpwbaanf6w65h" path="res://src/index_carousel.gd" id="5_uae8j"]
[ext_resource type="Script" uid="uid://c8m7eq6a3tpgu" path="res://src/item_details_ui.gd" id="6_s887n"]
[ext_resource type="Resource" uid="uid://cxm3s081hnw8l" path="res://resources/player_equipment.tres" id="7_s887n"]
[ext_resource type="PackedScene" uid="uid://cidwsnulug6fl" path="res://scenes/box_ui.tscn" id="8_g71ie"]
[ext_resource type="Script" uid="uid://c4gfdpuc14mpq" path="res://src/cancel_button.gd" id="10_p7iul"]

[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_as33y"]
size = Vector2(128, 128)

[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_tg4gd"]
size = Vector2(128, 128)

[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_usnyx"]
size = Vector2(128, 64)

[node name="Inventory" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
focus_mode = 2
theme = ExtResource("1_sr8g6")
script = ExtResource("1_as33y")
open_action = &"open_inventory"
close_action = &"ui_close_inventory"

[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.147672, 0.147672, 0.147672, 1)

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Contents" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
alignment = 1

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/Contents"]
layout_mode = 2

[node name="InventoryList" type="Control" parent="MarginContainer/Contents/MarginContainer" node_paths=PackedStringArray("carousel")]
custom_minimum_size = Vector2(0, 150)
layout_mode = 2
size_flags_vertical = 3
script = ExtResource("1_a0rpf")
inventory = ExtResource("2_as33y")
item_scene = ExtResource("3_tg4gd")
carousel = NodePath("Carousel")
metadata/_custom_type_script = "uid://qvoqvonnxwfc"

[node name="Carousel" type="Container" parent="MarginContainer/Contents/MarginContainer/InventoryList"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(1, 1.01)
script = ExtResource("5_uae8j")
with_drag = true
with_clamp = true
item_size = Vector2(150, 100)
item_seperation = 64
snap_behavior = 2
paging_requirement = 100
metadata/_custom_type_script = "uid://bpwbaanf6w65h"

[node name="Details" type="HBoxContainer" parent="MarginContainer/Contents" node_paths=PackedStringArray("viewport", "description_label", "action_menu")]
layout_mode = 2
size_flags_vertical = 3
script = ExtResource("6_s887n")
equipment = ExtResource("7_s887n")
viewport = NodePath("ItemDisplay/VBoxContainer/Body/Display/SubViewport")
description_label = NodePath("ItemDescription/VBoxContainer/Body/MarginContainer/Label")
action_menu = NodePath("ItemDescription/VBoxContainer/Body/MarginContainer/Box")

[node name="PlayerDetails" parent="MarginContainer/Contents/Details" instance=ExtResource("8_g71ie")]
layout_mode = 2
size_flags_horizontal = 3

[node name="Body" parent="MarginContainer/Contents/Details/PlayerDetails/VBoxContainer" index="1"]
clip_contents = true

[node name="PlayerInfo" type="VBoxContainer" parent="MarginContainer/Contents/Details/PlayerDetails/VBoxContainer/Body" index="0"]
layout_mode = 2
size_flags_horizontal = 3

[node name="TextureRect" type="TextureRect" parent="MarginContainer/Contents/Details/PlayerDetails/VBoxContainer/Body/PlayerInfo"]
layout_mode = 2
size_flags_horizontal = 4
texture = SubResource("PlaceholderTexture2D_as33y")

[node name="TextureRect2" type="TextureRect" parent="MarginContainer/Contents/Details/PlayerDetails/VBoxContainer/Body/PlayerInfo"]
layout_mode = 2
size_flags_horizontal = 4
texture = SubResource("PlaceholderTexture2D_tg4gd")

[node name="TextureRect3" type="TextureRect" parent="MarginContainer/Contents/Details/PlayerDetails/VBoxContainer/Body/PlayerInfo"]
layout_mode = 2
size_flags_horizontal = 4
texture = SubResource("PlaceholderTexture2D_usnyx")

[node name="ItemDisplay" parent="MarginContainer/Contents/Details" instance=ExtResource("8_g71ie")]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 1

[node name="Display" type="SubViewportContainer" parent="MarginContainer/Contents/Details/ItemDisplay/VBoxContainer/Body" index="0"]
layout_mode = 2
size_flags_horizontal = 3
stretch = true

[node name="SubViewport" type="SubViewport" parent="MarginContainer/Contents/Details/ItemDisplay/VBoxContainer/Body/Display"]
own_world_3d = true
transparent_bg = true
handle_input_locally = false
size = Vector2i(374, 464)
render_target_update_mode = 4

[node name="Camera3D" type="Camera3D" parent="MarginContainer/Contents/Details/ItemDisplay/VBoxContainer/Body/Display/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2)

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="MarginContainer/Contents/Details/ItemDisplay/VBoxContainer/Body/Display/SubViewport"]
transform = Transform3D(0.71887, 0.431921, -0.544674, -0.0668683, 0.822874, 0.564277, 0.691921, -0.36922, 0.620421, 0, 0, 0)

[node name="ItemDescription" parent="MarginContainer/Contents/Details" instance=ExtResource("8_g71ie")]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2

[node name="VBoxContainer" parent="MarginContainer/Contents/Details/ItemDescription" index="0"]
mouse_filter = 2

[node name="Header" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer" index="0"]
mouse_filter = 2

[node name="TitleContainer" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Header" index="0"]
mouse_filter = 2

[node name="Body" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer" index="1"]
mouse_filter = 2

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body" index="0"]
layout_mode = 2
mouse_filter = 2

[node name="Label" type="Label" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer"]
layout_mode = 2
size_flags_vertical = 1
autowrap_mode = 3

[node name="Box" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer" instance=ExtResource("8_g71ie")]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 8
focus_mode = 2

[node name="VBoxContainer" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box" index="0"]
mouse_filter = 2

[node name="Header" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer" index="0"]
mouse_filter = 2

[node name="TitleContainer" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Header" index="0"]
mouse_filter = 2

[node name="Body" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer" index="1"]
mouse_filter = 2

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body" index="0"]
layout_mode = 2
mouse_filter = 2

[node name="UseButton" type="Button" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer"]
layout_mode = 2
focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath(".")
focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../CombineButton")
focus_next = NodePath("../CombineButton")
focus_previous = NodePath(".")
mouse_filter = 1
mouse_default_cursor_shape = 2
text = "USE"
alignment = 0
script = ExtResource("10_p7iul")
metadata/_custom_type_script = "uid://c4gfdpuc14mpq"

[node name="CombineButton" type="Button" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer"]
layout_mode = 2
focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath("../UseButton")
focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath("../InspectButton")
focus_next = NodePath("../InspectButton")
focus_previous = NodePath("../UseButton")
mouse_filter = 1
text = "COMBINE"
alignment = 0
script = ExtResource("10_p7iul")
metadata/_custom_type_script = "uid://c4gfdpuc14mpq"

[node name="InspectButton" type="Button" parent="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer"]
layout_mode = 2
focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath("../CombineButton")
focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath(".")
focus_next = NodePath(".")
focus_previous = NodePath("../CombineButton")
mouse_filter = 1
text = "INSPECT"
alignment = 0
script = ExtResource("10_p7iul")
metadata/_custom_type_script = "uid://c4gfdpuc14mpq"

[connection signal="item_focused" from="MarginContainer/Contents/MarginContainer/InventoryList" to="MarginContainer/Contents/Details" method="_on_updated"]
[connection signal="item_selected" from="MarginContainer/Contents/MarginContainer/InventoryList" to="MarginContainer/Contents/Details" method="_on_selected"]
[connection signal="hidden" from="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box" to="." method="grab_focus"]
[connection signal="visibility_changed" from="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box" to="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer/UseButton" method="grab_focus"]
[connection signal="pressed" from="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer/UseButton" to="MarginContainer/Contents/Details" method="use"]
[connection signal="pressed" from="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer/CombineButton" to="MarginContainer/Contents/Details" method="combine"]
[connection signal="pressed" from="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box/VBoxContainer/Body/VBoxContainer/InspectButton" to="MarginContainer/Contents/Details" method="inspect"]

[editable path="MarginContainer/Contents/Details/PlayerDetails"]
[editable path="MarginContainer/Contents/Details/ItemDisplay"]
[editable path="MarginContainer/Contents/Details/ItemDescription"]
[editable path="MarginContainer/Contents/Details/ItemDescription/VBoxContainer/Body/MarginContainer/Box"]
