From 084aa107b98b3fb20f56df7f265718eafa82b3e4 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 24 Sep 2020 10:55:50 +0200 Subject: [PATCH] The crafting window is a module now aswell. --- .../CraftItemDescription.gd | 0 .../{windows => crafting}/CraftingWindow.gd | 6 +- game/ui/crafting/CraftingWindow.tscn | 317 ++++++++++++++++++ game/ui/crafting/game_module.tres | 12 + game/ui/player_ui/player_ui.tscn | 40 +-- game/ui/windows/CraftingWindow.tscn | 311 ----------------- 6 files changed, 335 insertions(+), 351 deletions(-) rename game/ui/{windows => crafting}/CraftItemDescription.gd (100%) rename game/ui/{windows => crafting}/CraftingWindow.gd (96%) create mode 100644 game/ui/crafting/CraftingWindow.tscn create mode 100644 game/ui/crafting/game_module.tres delete mode 100644 game/ui/windows/CraftingWindow.tscn diff --git a/game/ui/windows/CraftItemDescription.gd b/game/ui/crafting/CraftItemDescription.gd similarity index 100% rename from game/ui/windows/CraftItemDescription.gd rename to game/ui/crafting/CraftItemDescription.gd diff --git a/game/ui/windows/CraftingWindow.gd b/game/ui/crafting/CraftingWindow.gd similarity index 96% rename from game/ui/windows/CraftingWindow.gd rename to game/ui/crafting/CraftingWindow.gd index 45a9df2d..0080c416 100644 --- a/game/ui/windows/CraftingWindow.gd +++ b/game/ui/crafting/CraftingWindow.gd @@ -1,4 +1,4 @@ -extends PanelContainer +extends Control # Copyright (c) 2019-2020 Péter Magyar # @@ -20,7 +20,6 @@ extends PanelContainer # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -export(NodePath) var opener_button_path : NodePath var opener_button : BaseButton export(PackedScene) var item_entry_scene : PackedScene @@ -51,7 +50,6 @@ var _materials_container_main_on : Node var _materials_container_main_off : Node func _ready(): - opener_button = get_node_or_null(opener_button_path) as BaseButton connect("visibility_changed", self, "on_visibility_changed") _item_container = get_node(item_container_path) @@ -155,7 +153,7 @@ func on_visibility_changed(): if !visible && opener_button.pressed: opener_button.pressed = false -func _on_CraftingButton_toggled(button_pressed): +func _on_button_toggled(button_pressed): if button_pressed: if !visible: show() diff --git a/game/ui/crafting/CraftingWindow.tscn b/game/ui/crafting/CraftingWindow.tscn new file mode 100644 index 00000000..6fd13e36 --- /dev/null +++ b/game/ui/crafting/CraftingWindow.tscn @@ -0,0 +1,317 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=1] +[ext_resource path="res://ui/crafting/CraftingWindow.gd" type="Script" id=2] +[ext_resource path="res://ui/crafting/RecipeSelector.tscn" type="PackedScene" id=3] +[ext_resource path="res://ui/crafting/ItemEntry.tscn" type="PackedScene" id=4] +[ext_resource path="res://ui/crafting/CraftItemDescription.gd" type="Script" id=5] + +[sub_resource type="ButtonGroup" id=1] + +[node name="CraftingWindow" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} +item_entry_scene = ExtResource( 4 ) +recipe_selector_scene = ExtResource( 3 ) +item_container_path = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription") +tools_container_path = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/ToolsContainer") +materials_container_path = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/MaterialContainer") +recipe_selector_container_path = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/Recipes/VBoxContainer") +recipe_selector_main_on = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/Recipes") +recipe_selector_main_off = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/CenterContainer2") +materials_container_main_on = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry") +materials_container_main_off = NodePath("PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CenterContainer") + +[node name="PanelContainer" type="PanelContainer" parent="."] +margin_left = 43.0 +margin_top = 36.0 +margin_right = 995.0 +margin_bottom = 577.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"] +margin_left = 4.0 +margin_top = 4.0 +margin_right = 948.0 +margin_bottom = 537.0 + +[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"] +margin_right = 944.0 +margin_bottom = 30.0 + +[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/Header"] +margin_top = 7.0 +margin_right = 900.0 +margin_bottom = 22.0 +size_flags_horizontal = 3 +text = "Crafting" + +[node name="Button" type="Button" parent="PanelContainer/VBoxContainer/Header"] +margin_left = 904.0 +margin_right = 944.0 +margin_bottom = 30.0 +rect_min_size = Vector2( 40, 30 ) +text = "X" + +[node name="Categories" type="HBoxContainer" parent="PanelContainer/VBoxContainer"] +margin_top = 38.0 +margin_right = 944.0 +margin_bottom = 64.0 + +[node name="HBoxContainer2" type="HBoxContainer" parent="PanelContainer/VBoxContainer/Categories"] +margin_right = 944.0 +margin_bottom = 26.0 +rect_min_size = Vector2( 0, 20 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +alignment = 1 + +[node name="Alchemy" type="Button" parent="PanelContainer/VBoxContainer/Categories/HBoxContainer2"] +margin_left = 162.0 +margin_right = 262.0 +margin_bottom = 26.5702 +rect_min_size = Vector2( 100, 0 ) +toggle_mode = true +pressed = true +group = SubResource( 1 ) +text = "Alchemy" + +[node name="Smithing" type="Button" parent="PanelContainer/VBoxContainer/Categories/HBoxContainer2"] +margin_left = 266.0 +margin_right = 366.0 +margin_bottom = 26.5702 +rect_min_size = Vector2( 100, 0 ) +toggle_mode = true +group = SubResource( 1 ) +text = "Smithing" + +[node name="Enchanting" type="Button" parent="PanelContainer/VBoxContainer/Categories/HBoxContainer2"] +margin_left = 370.0 +margin_right = 470.0 +margin_bottom = 26.5702 +rect_min_size = Vector2( 100, 0 ) +toggle_mode = true +group = SubResource( 1 ) +text = "Enchantig" + +[node name="Engineering" type="Button" parent="PanelContainer/VBoxContainer/Categories/HBoxContainer2"] +margin_left = 474.0 +margin_right = 574.0 +margin_bottom = 26.5702 +rect_min_size = Vector2( 100, 0 ) +toggle_mode = true +group = SubResource( 1 ) +text = "Engineering" + +[node name="Tailoring" type="Button" parent="PanelContainer/VBoxContainer/Categories/HBoxContainer2"] +margin_left = 578.0 +margin_right = 678.0 +margin_bottom = 26.5702 +rect_min_size = Vector2( 100, 0 ) +toggle_mode = true +group = SubResource( 1 ) +text = "Tailoring" + +[node name="Other" type="Button" parent="PanelContainer/VBoxContainer/Categories/HBoxContainer2"] +margin_left = 682.0 +margin_right = 782.0 +margin_bottom = 26.5702 +rect_min_size = Vector2( 100, 0 ) +toggle_mode = true +group = SubResource( 1 ) +text = "Other" + +[node name="VBoxContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer"] +margin_top = 72.0 +margin_right = 944.0 +margin_bottom = 533.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer"] +margin_right = 944.0 +margin_bottom = 461.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="PanelContainer" type="PanelContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer"] +margin_right = 626.0 +margin_bottom = 461.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="CraftEntry" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer"] +visible = false +margin_left = 4.0 +margin_top = 4.0 +margin_right = 718.0 +margin_bottom = 516.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.6 +custom_constants/separation = 10 + +[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry"] +margin_right = 714.0 +margin_bottom = 472.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +scroll_horizontal_enabled = false + +[node name="VBoxContainer2" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer"] +margin_right = 714.0 +margin_bottom = 122.0 +size_flags_horizontal = 3 + +[node name="CraftItemDescription" type="HBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] +margin_right = 714.0 +margin_bottom = 60.0 +alignment = 1 +script = ExtResource( 5 ) +icon_path = NodePath("VBoxContainer/PanelContainer/TextureRect") +name_label_path = NodePath("PanelContainer2/VBoxContainer/Label") +description_label_path = NodePath("PanelContainer2/VBoxContainer/RichTextLabel") + +[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription"] +margin_left = 175.0 +margin_right = 235.0 +margin_bottom = 60.0 + +[node name="PanelContainer" type="PanelContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/VBoxContainer"] +margin_right = 60.0 +margin_bottom = 60.0 +rect_min_size = Vector2( 60, 60 ) + +[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/VBoxContainer/PanelContainer"] +margin_left = 4.0 +margin_top = 4.0 +margin_right = 56.0 +margin_bottom = 56.0 +expand = true + +[node name="PanelContainer2" type="PanelContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription"] +margin_left = 239.0 +margin_right = 539.0 +margin_bottom = 60.0 +rect_min_size = Vector2( 300, 0 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/PanelContainer2"] +margin_left = 4.0 +margin_top = 4.0 +margin_right = 296.0 +margin_bottom = 56.0 + +[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/PanelContainer2/VBoxContainer"] +margin_right = 292.0 +margin_bottom = 15.0 + +[node name="RichTextLabel" type="RichTextLabel" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/PanelContainer2/VBoxContainer"] +margin_top = 23.0 +margin_right = 292.0 +margin_bottom = 52.0 +size_flags_vertical = 3 +text = " +" +scroll_active = false + +[node name="Label2" type="Label" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] +margin_top = 68.0 +margin_right = 714.0 +margin_bottom = 83.0 +text = "Tools" + +[node name="ToolsContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] +margin_top = 91.0 +margin_right = 714.0 +margin_bottom = 91.0 + +[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] +margin_top = 99.0 +margin_right = 714.0 +margin_bottom = 114.0 +text = "Materials" + +[node name="MaterialContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] +margin_top = 122.0 +margin_right = 714.0 +margin_bottom = 122.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry"] +margin_top = 482.0 +margin_right = 714.0 +margin_bottom = 512.0 +alignment = 1 + +[node name="CraftButton" type="Button" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/HBoxContainer"] +margin_left = 307.0 +margin_right = 407.0 +margin_bottom = 30.0 +rect_min_size = Vector2( 100, 30 ) +text = "Craft" + +[node name="CenterContainer" type="CenterContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer"] +margin_left = 4.0 +margin_top = 4.0 +margin_right = 622.0 +margin_bottom = 457.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CenterContainer"] +margin_left = 264.0 +margin_top = 219.0 +margin_right = 354.0 +margin_bottom = 234.0 +text = "Select a recipe" +align = 1 +valign = 1 + +[node name="PanelContainer2" type="PanelContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer"] +margin_left = 630.0 +margin_right = 944.0 +margin_bottom = 461.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.5 + +[node name="Recipes" type="ScrollContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2"] +visible = false +margin_left = 4.0 +margin_top = 4.0 +margin_right = 286.0 +margin_bottom = 516.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/Recipes"] +margin_right = 282.0 +size_flags_horizontal = 3 + +[node name="CenterContainer2" type="CenterContainer" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2"] +margin_left = 4.0 +margin_top = 4.0 +margin_right = 310.0 +margin_bottom = 457.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/CenterContainer2"] +margin_left = 123.0 +margin_top = 219.0 +margin_right = 183.0 +margin_bottom = 234.0 +text = "No recipes" +align = 1 +valign = 1 +[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/Button" to="." method="hide"] +[connection signal="pressed" from="PanelContainer/VBoxContainer/Categories/HBoxContainer2/Alchemy" to="." method="set_category" binds= [ 1 ]] +[connection signal="pressed" from="PanelContainer/VBoxContainer/Categories/HBoxContainer2/Smithing" to="." method="set_category" binds= [ 2 ]] +[connection signal="pressed" from="PanelContainer/VBoxContainer/Categories/HBoxContainer2/Enchanting" to="." method="set_category" binds= [ 4 ]] +[connection signal="pressed" from="PanelContainer/VBoxContainer/Categories/HBoxContainer2/Engineering" to="." method="set_category" binds= [ 5 ]] +[connection signal="pressed" from="PanelContainer/VBoxContainer/Categories/HBoxContainer2/Tailoring" to="." method="set_category" binds= [ 3 ]] +[connection signal="pressed" from="PanelContainer/VBoxContainer/Categories/HBoxContainer2/Other" to="." method="set_category" binds= [ 0 ]] +[connection signal="pressed" from="PanelContainer/VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/HBoxContainer/CraftButton" to="." method="request_craft"] diff --git a/game/ui/crafting/game_module.tres b/game/ui/crafting/game_module.tres new file mode 100644 index 00000000..d1f3b6e5 --- /dev/null +++ b/game/ui/crafting/game_module.tres @@ -0,0 +1,12 @@ +[gd_resource type="Resource" load_steps=4 format=2] + +[ext_resource path="res://ui/theme/crafting_icon.tres" type="Texture" id=1] +[ext_resource path="res://scripts/game_modules/ui_window_module.gd" type="Script" id=2] +[ext_resource path="res://ui/crafting/CraftingWindow.tscn" type="PackedScene" id=3] + +[resource] +script = ExtResource( 2 ) +enabled = true +character_scene = ExtResource( 3 ) +opener_button_texture = ExtResource( 1 ) +index = 4 diff --git a/game/ui/player_ui/player_ui.tscn b/game/ui/player_ui/player_ui.tscn index a84c1401..9b4927a4 100644 --- a/game/ui/player_ui/player_ui.tscn +++ b/game/ui/player_ui/player_ui.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=15 format=2] [ext_resource path="res://player/GUI.gd" type="Script" id=1] [ext_resource path="res://ui/ingame_menu/IngameMenu.tscn" type="PackedScene" id=2] @@ -7,11 +7,9 @@ [ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=10] [ext_resource path="res://ui/bags/Bag.tscn" type="PackedScene" id=15] [ext_resource path="res://ui/loot_window/LootWindow.tscn" type="PackedScene" id=19] -[ext_resource path="res://ui/windows/CraftingWindow.tscn" type="PackedScene" id=20] [ext_resource path="res://ui/theme/bag_icon.tres" type="Texture" id=24] [ext_resource path="res://ui/theme/locked_icon.tres" type="Texture" id=25] [ext_resource path="res://ui/theme/unlocked_icon.tres" type="Texture" id=26] -[ext_resource path="res://ui/theme/crafting_icon.tres" type="Texture" id=27] [ext_resource path="res://ui/player_ui/player_ui.gd" type="Script" id=28] [ext_resource path="res://ui/buttons/ImageButton.tscn" type="PackedScene" id=30] [ext_resource path="res://ui/windows/TrainerWindow.tscn" type="PackedScene" id=31] @@ -70,32 +68,11 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="CraftingButton" type="Button" parent="GUI/Buttons"] +[node name="LockButton" type="Button" parent="GUI/Buttons"] margin_left = 25.0 margin_right = 50.0 margin_bottom = 40.0 rect_min_size = Vector2( 25, 30 ) -hint_tooltip = "Inventory" -focus_mode = 0 -toggle_mode = true -enabled_focus_mode = 0 -keep_pressed_outside = true - -[node name="TextureRect5" type="TextureRect" parent="GUI/Buttons/CraftingButton"] -anchor_right = 1.0 -anchor_bottom = 1.0 -texture = ExtResource( 27 ) -expand = true -stretch_mode = 6 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="LockButton" type="Button" parent="GUI/Buttons"] -margin_left = 50.0 -margin_right = 75.0 -margin_bottom = 40.0 -rect_min_size = Vector2( 25, 30 ) focus_mode = 0 toggle_mode = true enabled_focus_mode = 0 @@ -123,8 +100,8 @@ __meta__ = { } [node name="Menu" type="Button" parent="GUI/Buttons"] -margin_left = 75.0 -margin_right = 100.0 +margin_left = 50.0 +margin_right = 75.0 margin_bottom = 40.0 rect_min_size = Vector2( 25, 30 ) focus_mode = 0 @@ -144,14 +121,6 @@ __meta__ = { [node name="Windows" type="CanvasLayer" parent="GUI"] layer = 2 -[node name="CraftingWindow" parent="GUI/Windows" instance=ExtResource( 20 )] -visible = false -margin_left = 31.0 -margin_top = 23.0 -margin_right = -345.0 -margin_bottom = -67.0 -opener_button_path = NodePath("../../Buttons/CraftingButton") - [node name="Inventory" parent="GUI/Windows" instance=ExtResource( 15 )] visible = false margin_left = 56.0 @@ -191,7 +160,6 @@ margin_bottom = 502.847 [node name="IngameMenu" parent="GUI" instance=ExtResource( 2 )] visible = false [connection signal="toggled" from="GUI/Buttons/BagButton" to="GUI/Windows/Inventory" method="_on_BagButton_toggled"] -[connection signal="toggled" from="GUI/Buttons/CraftingButton" to="GUI/Windows/CraftingWindow" method="_on_CraftingButton_toggled"] [connection signal="pressed" from="GUI/Buttons/Menu" to="GUI/IngameMenu" method="show"] [editable path="GUI/IngameMenu"] diff --git a/game/ui/windows/CraftingWindow.tscn b/game/ui/windows/CraftingWindow.tscn deleted file mode 100644 index dc883e3f..00000000 --- a/game/ui/windows/CraftingWindow.tscn +++ /dev/null @@ -1,311 +0,0 @@ -[gd_scene load_steps=7 format=2] - -[ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=1] -[ext_resource path="res://ui/windows/CraftingWindow.gd" type="Script" id=2] -[ext_resource path="res://ui/crafting/RecipeSelector.tscn" type="PackedScene" id=3] -[ext_resource path="res://ui/crafting/ItemEntry.tscn" type="PackedScene" id=4] -[ext_resource path="res://ui/windows/CraftItemDescription.gd" type="Script" id=5] - -[sub_resource type="ButtonGroup" id=1] - -[node name="CraftingWindow" type="PanelContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 1 ) -script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} -item_entry_scene = ExtResource( 4 ) -recipe_selector_scene = ExtResource( 3 ) -item_container_path = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription") -tools_container_path = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/ToolsContainer") -materials_container_path = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/MaterialContainer") -recipe_selector_container_path = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/Recipes/VBoxContainer") -recipe_selector_main_on = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/Recipes") -recipe_selector_main_off = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/CenterContainer2") -materials_container_main_on = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry") -materials_container_main_off = NodePath("VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CenterContainer") - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -margin_left = 4.0 -margin_top = 4.0 -margin_right = 1020.0 -margin_bottom = 596.0 - -[node name="Header" type="HBoxContainer" parent="VBoxContainer"] -margin_right = 1016.0 -margin_bottom = 30.0 - -[node name="Label" type="Label" parent="VBoxContainer/Header"] -margin_top = 7.0 -margin_right = 972.0 -margin_bottom = 22.0 -size_flags_horizontal = 3 -text = "Crafting" - -[node name="Button" type="Button" parent="VBoxContainer/Header"] -margin_left = 976.0 -margin_right = 1016.0 -margin_bottom = 30.0 -rect_min_size = Vector2( 40, 30 ) -text = "X" - -[node name="Categories" type="HBoxContainer" parent="VBoxContainer"] -margin_top = 38.0 -margin_right = 1016.0 -margin_bottom = 64.0 - -[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/Categories"] -margin_right = 1016.0 -margin_bottom = 26.0 -rect_min_size = Vector2( 0, 20 ) -size_flags_horizontal = 3 -size_flags_vertical = 3 -alignment = 1 - -[node name="Alchemy" type="Button" parent="VBoxContainer/Categories/HBoxContainer2"] -margin_left = 198.0 -margin_right = 298.0 -margin_bottom = 26.269 -rect_min_size = Vector2( 100, 0 ) -toggle_mode = true -pressed = true -group = SubResource( 1 ) -text = "Alchemy" - -[node name="Smithing" type="Button" parent="VBoxContainer/Categories/HBoxContainer2"] -margin_left = 302.0 -margin_right = 402.0 -margin_bottom = 26.269 -rect_min_size = Vector2( 100, 0 ) -toggle_mode = true -group = SubResource( 1 ) -text = "Smithing" - -[node name="Enchanting" type="Button" parent="VBoxContainer/Categories/HBoxContainer2"] -margin_left = 406.0 -margin_right = 506.0 -margin_bottom = 26.269 -rect_min_size = Vector2( 100, 0 ) -toggle_mode = true -group = SubResource( 1 ) -text = "Enchantig" - -[node name="Engineering" type="Button" parent="VBoxContainer/Categories/HBoxContainer2"] -margin_left = 510.0 -margin_right = 610.0 -margin_bottom = 26.269 -rect_min_size = Vector2( 100, 0 ) -toggle_mode = true -group = SubResource( 1 ) -text = "Engineering" - -[node name="Tailoring" type="Button" parent="VBoxContainer/Categories/HBoxContainer2"] -margin_left = 614.0 -margin_right = 714.0 -margin_bottom = 26.269 -rect_min_size = Vector2( 100, 0 ) -toggle_mode = true -group = SubResource( 1 ) -text = "Tailoring" - -[node name="Other" type="Button" parent="VBoxContainer/Categories/HBoxContainer2"] -margin_left = 718.0 -margin_right = 818.0 -margin_bottom = 26.269 -rect_min_size = Vector2( 100, 0 ) -toggle_mode = true -group = SubResource( 1 ) -text = "Other" - -[node name="VBoxContainer" type="MarginContainer" parent="VBoxContainer"] -margin_top = 72.0 -margin_right = 1016.0 -margin_bottom = 592.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer"] -margin_right = 1016.0 -margin_bottom = 520.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer"] -margin_right = 674.0 -margin_bottom = 520.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="CraftEntry" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer"] -visible = false -margin_left = 4.0 -margin_top = 4.0 -margin_right = 718.0 -margin_bottom = 516.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -size_flags_stretch_ratio = 0.6 -custom_constants/separation = 10 - -[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry"] -margin_right = 714.0 -margin_bottom = 472.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -scroll_horizontal_enabled = false - -[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer"] -margin_right = 714.0 -margin_bottom = 122.0 -size_flags_horizontal = 3 - -[node name="CraftItemDescription" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] -margin_right = 714.0 -margin_bottom = 60.0 -alignment = 1 -script = ExtResource( 5 ) -icon_path = NodePath("VBoxContainer/PanelContainer/TextureRect") -name_label_path = NodePath("PanelContainer2/VBoxContainer/Label") -description_label_path = NodePath("PanelContainer2/VBoxContainer/RichTextLabel") - -[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription"] -margin_left = 175.0 -margin_right = 235.0 -margin_bottom = 60.0 - -[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/VBoxContainer"] -margin_right = 60.0 -margin_bottom = 60.0 -rect_min_size = Vector2( 60, 60 ) - -[node name="TextureRect" type="TextureRect" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/VBoxContainer/PanelContainer"] -margin_left = 4.0 -margin_top = 4.0 -margin_right = 56.0 -margin_bottom = 56.0 -expand = true - -[node name="PanelContainer2" type="PanelContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription"] -margin_left = 239.0 -margin_right = 539.0 -margin_bottom = 60.0 -rect_min_size = Vector2( 300, 0 ) - -[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/PanelContainer2"] -margin_left = 4.0 -margin_top = 4.0 -margin_right = 296.0 -margin_bottom = 56.0 - -[node name="Label" type="Label" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/PanelContainer2/VBoxContainer"] -margin_right = 292.0 -margin_bottom = 15.0 - -[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2/CraftItemDescription/PanelContainer2/VBoxContainer"] -margin_top = 23.0 -margin_right = 292.0 -margin_bottom = 52.0 -size_flags_vertical = 3 -text = " -" -scroll_active = false - -[node name="Label2" type="Label" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] -margin_top = 68.0 -margin_right = 714.0 -margin_bottom = 83.0 -text = "Tools" - -[node name="ToolsContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] -margin_top = 91.0 -margin_right = 714.0 -margin_bottom = 91.0 - -[node name="Label" type="Label" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] -margin_top = 99.0 -margin_right = 714.0 -margin_bottom = 114.0 -text = "Materials" - -[node name="MaterialContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/ScrollContainer/VBoxContainer2"] -margin_top = 122.0 -margin_right = 714.0 -margin_bottom = 122.0 - -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry"] -margin_top = 482.0 -margin_right = 714.0 -margin_bottom = 512.0 -alignment = 1 - -[node name="CraftButton" type="Button" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/HBoxContainer"] -margin_left = 307.0 -margin_right = 407.0 -margin_bottom = 30.0 -rect_min_size = Vector2( 100, 30 ) -text = "Craft" - -[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer"] -margin_left = 4.0 -margin_top = 4.0 -margin_right = 670.0 -margin_bottom = 516.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CenterContainer"] -margin_left = 288.0 -margin_top = 248.0 -margin_right = 378.0 -margin_bottom = 263.0 -text = "Select a recipe" -align = 1 -valign = 1 - -[node name="PanelContainer2" type="PanelContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer"] -margin_left = 678.0 -margin_right = 1016.0 -margin_bottom = 520.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -size_flags_stretch_ratio = 0.5 - -[node name="Recipes" type="ScrollContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2"] -visible = false -margin_left = 4.0 -margin_top = 4.0 -margin_right = 286.0 -margin_bottom = 516.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/Recipes"] -margin_right = 282.0 -size_flags_horizontal = 3 - -[node name="CenterContainer2" type="CenterContainer" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2"] -margin_left = 4.0 -margin_top = 4.0 -margin_right = 334.0 -margin_bottom = 516.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="Label" type="Label" parent="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer2/CenterContainer2"] -margin_left = 135.0 -margin_top = 248.0 -margin_right = 195.0 -margin_bottom = 263.0 -text = "No recipes" -align = 1 -valign = 1 -[connection signal="pressed" from="VBoxContainer/Header/Button" to="." method="hide"] -[connection signal="pressed" from="VBoxContainer/Categories/HBoxContainer2/Alchemy" to="." method="set_category" binds= [ 1 ]] -[connection signal="pressed" from="VBoxContainer/Categories/HBoxContainer2/Smithing" to="." method="set_category" binds= [ 2 ]] -[connection signal="pressed" from="VBoxContainer/Categories/HBoxContainer2/Enchanting" to="." method="set_category" binds= [ 4 ]] -[connection signal="pressed" from="VBoxContainer/Categories/HBoxContainer2/Engineering" to="." method="set_category" binds= [ 5 ]] -[connection signal="pressed" from="VBoxContainer/Categories/HBoxContainer2/Tailoring" to="." method="set_category" binds= [ 3 ]] -[connection signal="pressed" from="VBoxContainer/Categories/HBoxContainer2/Other" to="." method="set_category" binds= [ 0 ]] -[connection signal="pressed" from="VBoxContainer/VBoxContainer/HBoxContainer/PanelContainer/CraftEntry/HBoxContainer/CraftButton" to="." method="request_craft"]