[gd_scene load_steps=4 format=2]

[ext_resource path="res://addons/escoria-wizard/item_creator.gd" type="Script" id=1]
[ext_resource path="res://addons/escoria-wizard/graphics/inventory_preview.png" type="Texture" id=2]
[ext_resource path="res://addons/escoria-wizard/graphics/object_preview.png" type="Texture" id=3]

[node name="ItemCreator" type="MarginContainer"]
margin_left = 395.0
margin_top = 50.0
margin_right = 895.0
margin_bottom = 850.0
rect_min_size = Vector2( 500, 500 )
mouse_filter = 1
size_flags_horizontal = 4
size_flags_vertical = 4
script = ExtResource( 1 )

[node name="window_background_colour" type="ColorRect" parent="."]
margin_right = 500.0
margin_bottom = 800.0
rect_min_size = Vector2( 500, 800 )
color = Color( 0.235294, 0.341176, 0.290196, 1 )

[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_right = 500.0
margin_bottom = 800.0

[node name="Control" type="CenterContainer" parent="VBoxContainer"]
margin_right = 500.0
margin_bottom = 60.0
rect_min_size = Vector2( 0, 60 )

[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/Control"]
margin_left = 69.0
margin_top = 18.0
margin_right = 430.0
margin_bottom = 42.0

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Control/CenterContainer"]
margin_right = 361.0
margin_bottom = 24.0

[node name="BackgroundObjectCheckBox" type="CheckBox" parent="VBoxContainer/Control/CenterContainer/HBoxContainer"]
margin_right = 190.0
margin_bottom = 24.0
pressed = true
text = "Create background object"

[node name="InventoryItemCheckBox" type="CheckBox" parent="VBoxContainer/Control/CenterContainer/HBoxContainer"]
margin_left = 194.0
margin_right = 361.0
margin_bottom = 24.0
text = "Create inventory item"

[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
margin_top = 64.0
margin_right = 500.0
margin_bottom = 68.0

[node name="HelperHeading" type="MarginContainer" parent="VBoxContainer"]
margin_top = 72.0
margin_right = 500.0
margin_bottom = 112.0
rect_min_size = Vector2( 0, 40 )

[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/HelperHeading"]
margin_right = 500.0
margin_bottom = 40.0

[node name="ObjectHeading" type="Label" parent="VBoxContainer/HelperHeading/CenterContainer"]
margin_left = 196.0
margin_top = 13.0
margin_right = 303.0
margin_bottom = 27.0
custom_colors/font_color = Color( 0.592157, 0.87451, 0.533333, 1 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
text = "Object Creator"
uppercase = true

[node name="InventoryHeading" type="Label" parent="VBoxContainer/HelperHeading/CenterContainer"]
visible = false
margin_left = 165.0
margin_top = 13.0
margin_right = 335.0
margin_bottom = 27.0
custom_colors/font_color = Color( 0.592157, 0.87451, 0.533333, 1 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
text = "Inventory Item Creator"
uppercase = true

[node name="Description" type="MarginContainer" parent="VBoxContainer"]
margin_top = 116.0
margin_right = 500.0
margin_bottom = 249.0

[node name="ObjectDescription" type="Label" parent="VBoxContainer/Description"]
visible = false
margin_top = 8.0
margin_right = 500.0
margin_bottom = 124.0
text = "The object creator is used to create background objects
that the player can interact with, but that will not become
part of their inventory.

NOTE: The node will be created as a child of whichever node
is currently selected in the scene tree.
"
align = 1

[node name="InventoryDescription" type="Label" parent="VBoxContainer/Description"]
margin_right = 500.0
margin_bottom = 133.0
text = "The inventory item creator is used to create objects
that the player can pick up to add
to their inventory.

NOTE: The node will be created in the inventory
folder shown below. All inventory items for your
game must live in the same folder.
"
align = 1

[node name="Content" type="MarginContainer" parent="VBoxContainer"]
margin_top = 253.0
margin_right = 500.0
margin_bottom = 753.0
rect_min_size = Vector2( 0, 500 )
mouse_filter = 1
custom_constants/margin_right = 20
custom_constants/margin_top = 0
custom_constants/margin_left = 20

[node name="GridContainer" type="GridContainer" parent="VBoxContainer/Content"]
margin_left = 20.0
margin_right = 480.0
margin_bottom = 500.0
rect_min_size = Vector2( 460, 500 )
columns = 3

[node name="ItemNameLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 5.0
margin_right = 110.0
margin_bottom = 19.0
text = "Item name:"

[node name="ItemName" type="LineEdit" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_right = 354.0
margin_bottom = 24.0
rect_min_size = Vector2( 200, 0 )
text = "replace_me"

[node name="BlankItem" type="Control" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_right = 460.0
margin_bottom = 24.0

[node name="ItemGlobalIDLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 33.0
margin_right = 110.0
margin_bottom = 47.0
text = "Global ID:"

[node name="ItemGlobalID" type="LineEdit" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_top = 28.0
margin_right = 354.0
margin_bottom = 52.0

[node name="BlankItem2" type="Control" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_top = 28.0
margin_right = 460.0
margin_bottom = 52.0

[node name="StartsInteractiveLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 61.0
margin_right = 110.0
margin_bottom = 75.0
rect_min_size = Vector2( 110, 0 )
text = "Is 'Interactive':"

[node name="StartsInteractiveCheckBox" type="CheckBox" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_top = 56.0
margin_right = 354.0
margin_bottom = 80.0
hint_tooltip = "When the room first loads, can the player interact with this?"
pressed = true

[node name="BlankItem3" type="Control" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_top = 56.0
margin_right = 460.0
margin_bottom = 80.0

[node name="DefaultActionLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 84.0
margin_right = 110.0
margin_bottom = 115.0
text = "Default action:
"
valign = 1

[node name="DefaultActionOption" type="OptionButton" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_top = 84.0
margin_right = 354.0
margin_bottom = 115.0
rect_min_size = Vector2( 200, 31 )
text = "look"
items = [ "look", null, false, 0, null, "pick up", null, false, 1, null, "open", null, false, 2, null, "close", null, false, 3, null, "use", null, false, 4, null, "push", null, false, 5, null, "pull", null, false, 6, null, "talk", null, false, 7, null ]
selected = 0

[node name="BlankItem4" type="Control" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_top = 84.0
margin_right = 460.0
margin_bottom = 115.0

[node name="ImagePathLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 124.0
margin_right = 110.0
margin_bottom = 138.0
text = "Item graphic:"

[node name="ImagePath" type="LineEdit" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_top = 119.0
margin_right = 354.0
margin_bottom = 143.0
editable = false

[node name="ChangeImageButton" type="Button" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_top = 119.0
margin_right = 460.0
margin_bottom = 143.0
text = "Change Image"

[node name="PreviewLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 260.0
margin_right = 110.0
margin_bottom = 274.0
text = "Preview:"

[node name="Preview" type="ColorRect" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_top = 147.0
margin_right = 354.0
margin_bottom = 387.0
rect_min_size = Vector2( 240, 240 )
color = Color( 0.121569, 0.196078, 0.0823529, 1 )

[node name="BackgroundColour" type="ColorRect" parent="VBoxContainer/Content/GridContainer/Preview"]
margin_left = 4.0
margin_top = 4.0
margin_right = 236.0
margin_bottom = 236.0
rect_min_size = Vector2( 232, 232 )
color = Color( 0.254902, 0.231373, 0.231373, 1 )

[node name="InventoryPreview" type="TextureRect" parent="VBoxContainer/Content/GridContainer/Preview"]
visible = false
margin_left = 4.0
margin_top = 4.0
margin_right = 236.0
margin_bottom = 236.0
texture = ExtResource( 2 )

[node name="ObjectPreview" type="TextureRect" parent="VBoxContainer/Content/GridContainer/Preview"]
margin_left = 4.0
margin_top = 4.0
margin_right = 236.0
margin_bottom = 236.0
texture = ExtResource( 3 )

[node name="Preview" type="TextureRect" parent="VBoxContainer/Content/GridContainer/Preview"]
margin_left = 4.0
margin_top = 4.0
margin_right = 236.0
margin_bottom = 236.0
rect_min_size = Vector2( 232, 232 )

[node name="BlankItem5" type="Control" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_top = 147.0
margin_right = 460.0
margin_bottom = 387.0

[node name="ImageSizeLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_top = 391.0
margin_right = 110.0
margin_bottom = 405.0
text = "Image size:"

[node name="ImageSize" type="Label" parent="VBoxContainer/Content/GridContainer"]
margin_left = 114.0
margin_top = 391.0
margin_right = 354.0
margin_bottom = 405.0
text = "(0, 0)"

[node name="BlankItem6" type="Control" parent="VBoxContainer/Content/GridContainer"]
margin_left = 358.0
margin_top = 391.0
margin_right = 460.0
margin_bottom = 405.0

[node name="InventoryPathLabel" type="Label" parent="VBoxContainer/Content/GridContainer"]
visible = false
margin_top = 412.0
margin_right = 110.0
margin_bottom = 426.0
text = "Inventory path:"

[node name="InventoryPath" type="Label" parent="VBoxContainer/Content/GridContainer"]
visible = false
margin_left = 114.0
margin_top = 412.0
margin_right = 354.0
margin_bottom = 426.0
text = "res://"

[node name="ChangePathButton" type="Button" parent="VBoxContainer/Content/GridContainer"]
visible = false
margin_top = 409.0
margin_right = 110.0
margin_bottom = 429.0
text = "Change Path"

[node name="BlankItem7" type="Control" parent="VBoxContainer/Content/GridContainer"]
visible = false
margin_top = 409.0
margin_right = 110.0
margin_bottom = 409.0

[node name="Buttons" type="MarginContainer" parent="VBoxContainer"]
margin_top = 757.0
margin_right = 500.0
margin_bottom = 787.0
mouse_filter = 2
custom_constants/margin_bottom = 10

[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/Buttons"]
margin_right = 500.0
margin_bottom = 20.0

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Buttons/CenterContainer"]
margin_left = 98.0
margin_right = 402.0
margin_bottom = 20.0

[node name="CreateButton" type="Button" parent="VBoxContainer/Buttons/CenterContainer/HBoxContainer"]
margin_right = 100.0
margin_bottom = 20.0
text = "Create Object"

[node name="Spacer" type="Control" parent="VBoxContainer/Buttons/CenterContainer/HBoxContainer"]
margin_left = 104.0
margin_right = 124.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )

[node name="ClearButton" type="Button" parent="VBoxContainer/Buttons/CenterContainer/HBoxContainer"]
margin_left = 128.0
margin_right = 193.0
margin_bottom = 20.0
text = "Clear All"

[node name="Spacer2" type="Control" parent="VBoxContainer/Buttons/CenterContainer/HBoxContainer"]
margin_left = 197.0
margin_right = 217.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )

[node name="ExitButton" type="Button" parent="VBoxContainer/Buttons/CenterContainer/HBoxContainer"]
margin_left = 221.0
margin_right = 304.0
margin_bottom = 20.0
text = "Main Menu"

[node name="LoadObjectGraphic" type="CenterContainer" parent="."]
visible = false
margin_right = 500.0
margin_bottom = 800.0
mouse_filter = 2

[node name="LoadObjectFileDialog" type="FileDialog" parent="LoadObjectGraphic"]
margin_left = -150.0
margin_top = 100.0
margin_right = 650.0
margin_bottom = 700.0
rect_min_size = Vector2( 800, 600 )
popup_exclusive = true
window_title = "Open a File"
mode = 0
filters = PoolStringArray( "*.png", "*.bmp", "*.jpg", "*.jpeg", "*.webp", "*.tga" )

[node name="Windows" type="CenterContainer" parent="."]
visible = false
margin_right = 500.0
margin_bottom = 800.0

[node name="ConfirmationDialog" type="ConfirmationDialog" parent="Windows"]
margin_left = 90.0
margin_top = 354.0
margin_right = 409.0
margin_bottom = 446.0
dialog_text = "WARNING!

If you continue you will lose the current object."

[node name="ErrorDialog" type="AcceptDialog" parent="Windows"]
margin_left = 208.0
margin_top = 371.0
margin_right = 291.0
margin_bottom = 429.0

[node name="CreateCompleteDialog" type="AcceptDialog" parent="Windows"]
margin_left = 208.0
margin_top = 371.0
margin_right = 291.0
margin_bottom = 429.0

[node name="FileDialog" type="FileDialog" parent="Windows"]
visible = true
margin_left = 50.0
margin_top = 150.0
margin_right = 450.0
margin_bottom = 650.0
rect_min_size = Vector2( 400, 500 )
window_title = "Open a Directory"
mode = 2

[connection signal="toggled" from="VBoxContainer/Control/CenterContainer/HBoxContainer/BackgroundObjectCheckBox" to="." method="_on_BackgroundObjectCheckBox_toggled"]
[connection signal="toggled" from="VBoxContainer/Control/CenterContainer/HBoxContainer/InventoryItemCheckBox" to="." method="_on_InventoryItemCheckBox_toggled"]
[connection signal="text_changed" from="VBoxContainer/Content/GridContainer/ItemName" to="." method="background_on_ItemName_text_changed"]
[connection signal="text_changed" from="VBoxContainer/Content/GridContainer/ItemGlobalID" to="." method="_on_ItemGlobalID_text_changed"]
[connection signal="pressed" from="VBoxContainer/Content/GridContainer/StartsInteractiveCheckBox" to="." method="_on_StartsInteractiveCheckBox_pressed"]
[connection signal="item_selected" from="VBoxContainer/Content/GridContainer/DefaultActionOption" to="." method="_on_DefaultActionOption_item_selected"]
[connection signal="pressed" from="VBoxContainer/Content/GridContainer/ChangeImageButton" to="." method="load_button_pressed"]
[connection signal="pressed" from="VBoxContainer/Content/GridContainer/ChangePathButton" to="." method="_on_ChangePathButton_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/CenterContainer/HBoxContainer/CreateButton" to="." method="_on_CreateButton_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/CenterContainer/HBoxContainer/ClearButton" to="." method="Item_on_ClearButton_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/CenterContainer/HBoxContainer/ExitButton" to="." method="Item_on_ExitButton_pressed"]
[connection signal="file_selected" from="LoadObjectGraphic/LoadObjectFileDialog" to="." method="LoadObjectFileDialog_file_selected"]
[connection signal="confirmed" from="Windows/ConfirmationDialog" to="." method="_on_ObjectConfirmationDialog_confirmed"]
[connection signal="confirmed" from="Windows/CreateCompleteDialog" to="." method="_on_CreateCompleteDialog_confirmed"]
[connection signal="dir_selected" from="Windows/FileDialog" to="." method="_on_FileDialog_dir_selected"]
