diff --git a/frontend/Savor-22b/scenes/house/recipebook/ingredient.gd b/frontend/Savor-22b/scenes/house/recipebook/ingredient.gd new file mode 100644 index 00000000..d2cfed8d --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook/ingredient.gd @@ -0,0 +1,18 @@ +extends Control + +@onready var button = $Ing +var ingname +var format_string = "[%s]" + + +func _ready(): + update_info() + + + + +func set_ingname(name: String): + ingname = name + +func update_info(): + button.text = format_string % [ingname] diff --git a/frontend/Savor-22b/scenes/house/recipebook/ingredient.tscn b/frontend/Savor-22b/scenes/house/recipebook/ingredient.tscn new file mode 100644 index 00000000..29c0484f --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook/ingredient.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=3 format=3 uid="uid://me2nvitswvki"] + +[ext_resource type="Script" path="res://scenes/house/recipebook/ingredient.gd" id="1_g877k"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jup0i"] +bg_color = Color(0.94902, 0.596078, 0.0784314, 1) +corner_radius_top_left = 20 +corner_radius_top_right = 20 +corner_radius_bottom_right = 20 +corner_radius_bottom_left = 20 + +[node name="ingredient" type="Control"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 3 +anchors_preset = 0 +offset_right = 180.0 +offset_bottom = 110.0 +script = ExtResource("1_g877k") + +[node name="Ing" type="Button" parent="."] +custom_minimum_size = Vector2(180, 110) +layout_mode = 0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[춘장] +보유중" diff --git a/frontend/Savor-22b/scenes/house/recipebook/recipe.gd b/frontend/Savor-22b/scenes/house/recipebook/recipe.gd index b9538eab..3f8e2774 100644 --- a/frontend/Savor-22b/scenes/house/recipebook/recipe.gd +++ b/frontend/Savor-22b/scenes/house/recipebook/recipe.gd @@ -1,14 +1,16 @@ extends Control -const ING_YES = preload("res://scenes/house/recipebook/ingredient_yes.tscn") -const ING_NO = preload("res://scenes/house/recipebook/ingredient_no.tscn") +const ING = preload("res://scenes/house/recipebook/ingredient.tscn") @onready var ingredients = $panel/M/V/Description/Ingredients/list +@onready var tools = $panel/M/V/Description/Tools +@onready var reqblock = $panel/M/V/Blockreq var info -var inventorylist -var name_format = "[%s] 레시피" + +var name_format = "[%s] 레시피"; +var block_format = "소요 블록 %s 블록" func _ready(): update_info() @@ -19,7 +21,6 @@ func set_info(recipe: Dictionary): info = recipe func update_info(): - inventorylist = SceneContext.user_state["inventoryState"] # Setting names in UI var name = info.name @@ -28,36 +29,21 @@ func update_info(): # Getting exist for ing in info["ingredientIDList"]: - var created = false - for inving in inventorylist.refrigeratorStateList: - if ing["name"] == inving["name"]: - var ing_y = ING_YES.instantiate() - ing_y.set_ingname(ing["name"]) - ingredients.add_child(ing_y) - created = true - break + var ing_ins = ING.instantiate() + ing_ins.set_ingname(ing["name"]) + ingredients.add_child(ing_ins) - if(!created): - var ing_n = ING_NO.instantiate() - ing_n.set_ingname(ing["name"]) - ingredients.add_child(ing_n) - for ing in info["foodIDList"]: - var created = false - # refrigeratorstatelist에 만들어진 음식이 없는 경우 수정 필요 - for inving in inventorylist.refrigeratorStateList: - if ing["name"] == inving["name"]: - var ing_y = ING_YES.instantiate() - ing_y.set_ingname(ing["name"]) - ingredients.add_child(ing_y) - created = true - break + var ing_ins = ING.instantiate() + ing_ins.set_ingname(ing["name"]) + ingredients.add_child(ing_ins) - if(!created): - var ing_n = ING_NO.instantiate() - ing_n.set_ingname(ing["name"]) - ingredients.add_child(ing_n) - + for tool in info["requiredKitchenEquipmentCategoryList"]: + var tool_ins = ING.instantiate() + tool_ins.set_ingname(tool["name"]) + tools.add_child(tool_ins) + + set_block_req() -func insufficient(): - $panel/M/V/Title/insufficient.visible = true +func set_block_req(): + reqblock.text = block_format % [ info["requiredBlockCount"] ] diff --git a/frontend/Savor-22b/scenes/house/recipebook/recipe.tscn b/frontend/Savor-22b/scenes/house/recipebook/recipe.tscn index 18001002..01d8185d 100644 --- a/frontend/Savor-22b/scenes/house/recipebook/recipe.tscn +++ b/frontend/Savor-22b/scenes/house/recipebook/recipe.tscn @@ -1,15 +1,8 @@ -[gd_scene load_steps=4 format=3 uid="uid://bam215608gpdl"] +[gd_scene load_steps=3 format=3 uid="uid://bam215608gpdl"] [ext_resource type="StyleBox" uid="uid://b2nqsuwp80vsg" path="res://scenes/house/recipebook/recipe_style_box_flat.tres" id="1_8ipq3"] [ext_resource type="Script" path="res://scenes/house/recipebook/recipe.gd" id="2_jlc81"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jup0i"] -bg_color = Color(0.94902, 0.596078, 0.0784314, 1) -corner_radius_top_left = 20 -corner_radius_top_right = 20 -corner_radius_bottom_right = 20 -corner_radius_bottom_left = 20 - [node name="Recipe" type="Control"] custom_minimum_size = Vector2(700, 550) layout_direction = 1 @@ -48,12 +41,6 @@ layout_mode = 2 theme_override_font_sizes/font_size = 40 text = "[트러플 짜장면] 레시피" -[node name="insufficient" type="Label" parent="panel/M/V/Title"] -visible = false -layout_mode = 2 -theme_override_font_sizes/font_size = 40 -text = "(재료부족)" - [node name="Blockreq" type="Label" parent="panel/M/V"] layout_mode = 2 theme_override_colors/font_color = Color(1, 0.541176, 0, 1) @@ -77,24 +64,6 @@ text = "[조리도구]" layout_mode = 2 theme_override_constants/separation = 20 -[node name="Availabletools" type="Button" parent="panel/M/V/Description/Tools"] -custom_minimum_size = Vector2(180, 110) -layout_mode = 2 -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_font_sizes/font_size = 25 -theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") -text = "[-- -] -사용 가능" - -[node name="Availabletools2" type="Button" parent="panel/M/V/Description/Tools"] -custom_minimum_size = Vector2(180, 110) -layout_mode = 2 -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_font_sizes/font_size = 25 -theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") -text = "[-- -] -사용 가능" - [node name="T2" type="Label" parent="panel/M/V/Description"] layout_mode = 2 theme_override_font_sizes/font_size = 35 diff --git a/frontend/Savor-22b/scenes/house/recipebook/recipebook.tscn b/frontend/Savor-22b/scenes/house/recipebook/recipebook.tscn index 4de44c89..07059575 100644 --- a/frontend/Savor-22b/scenes/house/recipebook/recipebook.tscn +++ b/frontend/Savor-22b/scenes/house/recipebook/recipebook.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://cpx04yry0xj16"] +[gd_scene load_steps=4 format=3 uid="uid://cpx04yry0xj16"] [ext_resource type="Script" path="res://scenes/house/recipebook/recipebook.gd" id="1_8dllv"] @@ -15,11 +15,6 @@ corner_radius_bottom_right = 50 corner_radius_bottom_left = 50 shadow_size = 5 -[sub_resource type="FontVariation" id="FontVariation_eybux"] -variation_embolden = -0.3 - -[sub_resource type="SystemFont" id="SystemFont_ardk6"] - [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ym4cf"] bg_color = Color(0, 0, 0, 1) corner_radius_top_left = 30 @@ -27,13 +22,6 @@ corner_radius_top_right = 30 corner_radius_bottom_right = 30 corner_radius_bottom_left = 30 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rle7u"] -bg_color = Color(0, 0, 0, 1) -corner_radius_top_left = 15 -corner_radius_top_right = 15 -corner_radius_bottom_right = 15 -corner_radius_bottom_left = 15 - [node name="Recipebook" type="Control"] custom_minimum_size = Vector2(1600, 900) layout_mode = 3 @@ -72,31 +60,10 @@ layout_mode = 2 size_flags_horizontal = 4 theme_override_colors/font_color = Color(0, 0, 0, 1) theme_override_font_sizes/font_size = 70 -text = "조리 가능한 레시피" - -[node name="Description" type="HBoxContainer" parent="background/M/V"] -layout_mode = 2 -size_flags_vertical = 4 -alignment = 1 - -[node name="Desc" type="Label" parent="background/M/V/Description"] -layout_mode = 2 -size_flags_horizontal = 4 -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_fonts/font = SubResource("FontVariation_eybux") -theme_override_font_sizes/font_size = 45 -text = "현재 설치된 조리도구" - -[node name="ription" type="Label" parent="background/M/V/Description"] -layout_mode = 2 -size_flags_horizontal = 4 -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_fonts/font = SubResource("SystemFont_ardk6") -theme_override_font_sizes/font_size = 45 -text = "[ 중화 웍, 후라이팬, ... ]" +text = "레시피" [node name="S" type="ScrollContainer" parent="background/M/V"] -custom_minimum_size = Vector2(2.08165e-12, 580) +custom_minimum_size = Vector2(2.08165e-12, 660) layout_mode = 2 [node name="G" type="GridContainer" parent="background/M/V/S"] @@ -107,22 +74,15 @@ columns = 2 [node name="BottomMenu" type="HBoxContainer" parent="background/M/V"] layout_mode = 2 theme_override_constants/separation = 850 +alignment = 2 [node name="Close" type="Button" parent="background/M/V/BottomMenu"] custom_minimum_size = Vector2(150, 60) layout_mode = 2 +size_flags_horizontal = 8 theme_override_colors/font_color = Color(1, 1, 1, 1) theme_override_font_sizes/font_size = 35 theme_override_styles/normal = SubResource("StyleBoxFlat_ym4cf") text = "닫기" -[node name="Cook" type="Button" parent="background/M/V/BottomMenu"] -custom_minimum_size = Vector2(450, 60) -layout_mode = 2 -size_flags_horizontal = 8 -theme_override_colors/font_color = Color(1, 1, 1, 1) -theme_override_font_sizes/font_size = 35 -theme_override_styles/normal = SubResource("StyleBoxFlat_rle7u") -text = "선택한 레시피로 조리하기" - [connection signal="button_down" from="background/M/V/BottomMenu/Close" to="." method="_on_close_button_down"] diff --git a/frontend/Savor-22b/scenes/house/recipebook/ingredient_no.gd b/frontend/Savor-22b/scenes/house/recipebook_old/ingredient_no.gd similarity index 100% rename from frontend/Savor-22b/scenes/house/recipebook/ingredient_no.gd rename to frontend/Savor-22b/scenes/house/recipebook_old/ingredient_no.gd diff --git a/frontend/Savor-22b/scenes/house/recipebook/ingredient_no.tscn b/frontend/Savor-22b/scenes/house/recipebook_old/ingredient_no.tscn similarity index 92% rename from frontend/Savor-22b/scenes/house/recipebook/ingredient_no.tscn rename to frontend/Savor-22b/scenes/house/recipebook_old/ingredient_no.tscn index fada25d3..26ca5ed4 100644 --- a/frontend/Savor-22b/scenes/house/recipebook/ingredient_no.tscn +++ b/frontend/Savor-22b/scenes/house/recipebook_old/ingredient_no.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=4 format=3 uid="uid://cte67bdw48cd6"] +[gd_scene load_steps=4 format=3 uid="uid://bsege78bb6kh3"] -[ext_resource type="Script" path="res://scenes/house/recipebook/ingredient_no.gd" id="1_8dhac"] +[ext_resource type="Script" path="res://scenes/house/recipebook/ingredient_no.gd" id="1_dc1oa"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jup0i"] bg_color = Color(0.94902, 0.596078, 0.0784314, 1) @@ -18,7 +18,7 @@ layout_mode = 3 anchors_preset = 0 offset_right = 180.0 offset_bottom = 110.0 -script = ExtResource("1_8dhac") +script = ExtResource("1_dc1oa") [node name="NoIng" type="Button" parent="."] custom_minimum_size = Vector2(180, 110) diff --git a/frontend/Savor-22b/scenes/house/recipebook/ingredient_yes.gd b/frontend/Savor-22b/scenes/house/recipebook_old/ingredient_yes.gd similarity index 100% rename from frontend/Savor-22b/scenes/house/recipebook/ingredient_yes.gd rename to frontend/Savor-22b/scenes/house/recipebook_old/ingredient_yes.gd diff --git a/frontend/Savor-22b/scenes/house/recipebook/ingredient_yes.tscn b/frontend/Savor-22b/scenes/house/recipebook_old/ingredient_yes.tscn similarity index 85% rename from frontend/Savor-22b/scenes/house/recipebook/ingredient_yes.tscn rename to frontend/Savor-22b/scenes/house/recipebook_old/ingredient_yes.tscn index ddd244be..795765ba 100644 --- a/frontend/Savor-22b/scenes/house/recipebook/ingredient_yes.tscn +++ b/frontend/Savor-22b/scenes/house/recipebook_old/ingredient_yes.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=3 format=3 uid="uid://me2nvitswvki"] +[gd_scene load_steps=3 format=3 uid="uid://cvackndy25dlm"] -[ext_resource type="Script" path="res://scenes/house/recipebook/ingredient_yes.gd" id="1_ictny"] +[ext_resource type="Script" path="res://scenes/house/recipebook/ingredient_yes.gd" id="1_7fepo"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jup0i"] bg_color = Color(0.94902, 0.596078, 0.0784314, 1) @@ -15,7 +15,7 @@ layout_mode = 3 anchors_preset = 0 offset_right = 180.0 offset_bottom = 110.0 -script = ExtResource("1_ictny") +script = ExtResource("1_7fepo") [node name="Ing" type="Button" parent="."] custom_minimum_size = Vector2(180, 110) diff --git a/frontend/Savor-22b/scenes/house/recipebook_old/recipe.gd b/frontend/Savor-22b/scenes/house/recipebook_old/recipe.gd new file mode 100644 index 00000000..b9538eab --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook_old/recipe.gd @@ -0,0 +1,63 @@ +extends Control + +const ING_YES = preload("res://scenes/house/recipebook/ingredient_yes.tscn") +const ING_NO = preload("res://scenes/house/recipebook/ingredient_no.tscn") + +@onready var ingredients = $panel/M/V/Description/Ingredients/list + +var info +var inventorylist + +var name_format = "[%s] 레시피" + +func _ready(): + update_info() + + + +func set_info(recipe: Dictionary): + info = recipe + +func update_info(): + inventorylist = SceneContext.user_state["inventoryState"] + + # Setting names in UI + var name = info.name + name = name.left(name.length() -4) + $panel/M/V/Title/Name.text = name_format % [name] + + # Getting exist + for ing in info["ingredientIDList"]: + var created = false + for inving in inventorylist.refrigeratorStateList: + if ing["name"] == inving["name"]: + var ing_y = ING_YES.instantiate() + ing_y.set_ingname(ing["name"]) + ingredients.add_child(ing_y) + created = true + break + + if(!created): + var ing_n = ING_NO.instantiate() + ing_n.set_ingname(ing["name"]) + ingredients.add_child(ing_n) + + for ing in info["foodIDList"]: + var created = false + # refrigeratorstatelist에 만들어진 음식이 없는 경우 수정 필요 + for inving in inventorylist.refrigeratorStateList: + if ing["name"] == inving["name"]: + var ing_y = ING_YES.instantiate() + ing_y.set_ingname(ing["name"]) + ingredients.add_child(ing_y) + created = true + break + + if(!created): + var ing_n = ING_NO.instantiate() + ing_n.set_ingname(ing["name"]) + ingredients.add_child(ing_n) + + +func insufficient(): + $panel/M/V/Title/insufficient.visible = true diff --git a/frontend/Savor-22b/scenes/house/recipebook_old/recipe.tscn b/frontend/Savor-22b/scenes/house/recipebook_old/recipe.tscn new file mode 100644 index 00000000..ee3497c2 --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook_old/recipe.tscn @@ -0,0 +1,108 @@ +[gd_scene load_steps=4 format=3 uid="uid://cwntcvxk7dsm1"] + +[ext_resource type="Script" path="res://scenes/house/recipebook/recipe.gd" id="1_rh6ky"] +[ext_resource type="StyleBox" uid="uid://b2nqsuwp80vsg" path="res://scenes/house/recipebook/recipe_style_box_flat.tres" id="2_ce356"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jup0i"] +bg_color = Color(0.94902, 0.596078, 0.0784314, 1) +corner_radius_top_left = 20 +corner_radius_top_right = 20 +corner_radius_bottom_right = 20 +corner_radius_bottom_left = 20 + +[node name="Recipe" type="Control"] +custom_minimum_size = Vector2(700, 550) +layout_direction = 1 +layout_mode = 3 +anchors_preset = 0 +offset_right = 700.0 +offset_bottom = 550.0 +script = ExtResource("1_rh6ky") + +[node name="panel" type="Panel" parent="."] +custom_minimum_size = Vector2(700, 550) +layout_mode = 0 +theme_override_styles/panel = ExtResource("2_ce356") + +[node name="M" type="MarginContainer" parent="panel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 50 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 50 +theme_override_constants/margin_bottom = 10 + +[node name="V" type="VBoxContainer" parent="panel/M"] +layout_mode = 2 + +[node name="Title" type="HBoxContainer" parent="panel/M/V"] +layout_mode = 2 +size_flags_horizontal = 0 + +[node name="Name" type="Label" parent="panel/M/V/Title"] +layout_mode = 2 +theme_override_font_sizes/font_size = 40 +text = "[트러플 짜장면] 레시피" + +[node name="insufficient" type="Label" parent="panel/M/V/Title"] +visible = false +layout_mode = 2 +theme_override_font_sizes/font_size = 40 +text = "(재료부족)" + +[node name="Blockreq" type="Label" parent="panel/M/V"] +layout_mode = 2 +theme_override_colors/font_color = Color(1, 0.541176, 0, 1) +theme_override_font_sizes/font_size = 30 +text = "소요 블록 N 블록" + +[node name="Space" type="MarginContainer" parent="panel/M/V"] +layout_mode = 2 +theme_override_constants/margin_top = 10 + +[node name="Description" type="VBoxContainer" parent="panel/M/V"] +layout_mode = 2 +theme_override_constants/separation = 15 + +[node name="T1" type="Label" parent="panel/M/V/Description"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +text = "[조리도구]" + +[node name="Tools" type="HBoxContainer" parent="panel/M/V/Description"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="Availabletools" type="Button" parent="panel/M/V/Description/Tools"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[-- -] +사용 가능" + +[node name="Availabletools2" type="Button" parent="panel/M/V/Description/Tools"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[-- -] +사용 가능" + +[node name="T2" type="Label" parent="panel/M/V/Description"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +text = "[식재료]" + +[node name="Ingredients" type="ScrollContainer" parent="panel/M/V/Description"] +layout_mode = 2 +vertical_scroll_mode = 0 + +[node name="list" type="HBoxContainer" parent="panel/M/V/Description/Ingredients"] +layout_mode = 2 diff --git a/frontend/Savor-22b/scenes/house/recipebook_old/recipe_style_box_flat.tres b/frontend/Savor-22b/scenes/house/recipebook_old/recipe_style_box_flat.tres new file mode 100644 index 00000000..603e7ac3 --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook_old/recipe_style_box_flat.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://11mp1rt5urff"] + +[resource] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 50 +corner_radius_top_right = 50 +corner_radius_bottom_right = 50 +corner_radius_bottom_left = 50 diff --git a/frontend/Savor-22b/scenes/house/recipebook_old/recipebook.gd b/frontend/Savor-22b/scenes/house/recipebook_old/recipebook.gd new file mode 100644 index 00000000..be7d7b00 --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook_old/recipebook.gd @@ -0,0 +1,19 @@ +extends Control + +const RECIPE = preload("res://scenes/house/recipebook/recipe.tscn") + +@onready var grid = $background/M/V/S/G + +var recipelist = SceneContext.recipe["recipe"] + +func _ready(): + for singlerecipe in recipelist: + var recipe = RECIPE.instantiate() + recipe.set_info(singlerecipe) + grid.add_child(recipe) + + + + +func _on_close_button_down(): + queue_free() diff --git a/frontend/Savor-22b/scenes/house/recipebook_old/recipebook.tscn b/frontend/Savor-22b/scenes/house/recipebook_old/recipebook.tscn new file mode 100644 index 00000000..d094ef43 --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook_old/recipebook.tscn @@ -0,0 +1,128 @@ +[gd_scene load_steps=7 format=3 uid="uid://paaor8um57hy"] + +[ext_resource type="Script" path="res://scenes/house/recipebook/recipebook.gd" id="1_2wc5e"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tvose"] +bg_color = Color(0.94902, 0.694118, 0.0784314, 1) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color(0, 0, 0, 1) +corner_radius_top_left = 50 +corner_radius_top_right = 50 +corner_radius_bottom_right = 50 +corner_radius_bottom_left = 50 +shadow_size = 5 + +[sub_resource type="FontVariation" id="FontVariation_eybux"] +variation_embolden = -0.3 + +[sub_resource type="SystemFont" id="SystemFont_ardk6"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ym4cf"] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 30 +corner_radius_top_right = 30 +corner_radius_bottom_right = 30 +corner_radius_bottom_left = 30 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rle7u"] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 15 +corner_radius_top_right = 15 +corner_radius_bottom_right = 15 +corner_radius_bottom_left = 15 + +[node name="Recipebook" type="Control"] +custom_minimum_size = Vector2(1600, 900) +layout_mode = 3 +anchors_preset = 0 +offset_right = 1600.0 +offset_bottom = 900.0 +script = ExtResource("1_2wc5e") + +[node name="background" type="Panel" parent="."] +custom_minimum_size = Vector2(1600, 900) +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_tvose") + +[node name="M" type="MarginContainer" parent="background"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 60 +theme_override_constants/margin_top = 20 +theme_override_constants/margin_right = 60 +theme_override_constants/margin_bottom = 30 + +[node name="V" type="VBoxContainer" parent="background/M"] +layout_mode = 2 + +[node name="Title" type="Label" parent="background/M/V"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 70 +text = "조리 가능한 레시피" + +[node name="Description" type="HBoxContainer" parent="background/M/V"] +layout_mode = 2 +size_flags_vertical = 4 +alignment = 1 + +[node name="Desc" type="Label" parent="background/M/V/Description"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_fonts/font = SubResource("FontVariation_eybux") +theme_override_font_sizes/font_size = 45 +text = "현재 설치된 조리도구" + +[node name="ription" type="Label" parent="background/M/V/Description"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_fonts/font = SubResource("SystemFont_ardk6") +theme_override_font_sizes/font_size = 45 +text = "[ 중화 웍, 후라이팬, ... ]" + +[node name="S" type="ScrollContainer" parent="background/M/V"] +custom_minimum_size = Vector2(2.08165e-12, 580) +layout_mode = 2 + +[node name="G" type="GridContainer" parent="background/M/V/S"] +layout_mode = 2 +theme_override_constants/h_separation = 50 +columns = 2 + +[node name="BottomMenu" type="HBoxContainer" parent="background/M/V"] +layout_mode = 2 +theme_override_constants/separation = 850 + +[node name="Close" type="Button" parent="background/M/V/BottomMenu"] +custom_minimum_size = Vector2(150, 60) +layout_mode = 2 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_ym4cf") +text = "닫기" + +[node name="Cook" type="Button" parent="background/M/V/BottomMenu"] +custom_minimum_size = Vector2(450, 60) +layout_mode = 2 +size_flags_horizontal = 8 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_rle7u") +text = "선택한 레시피로 조리하기" + +[connection signal="button_down" from="background/M/V/BottomMenu/Close" to="." method="_on_close_button_down"] diff --git a/frontend/Savor-22b/scenes/house/recipebook_old/recipebook_preset.tscn b/frontend/Savor-22b/scenes/house/recipebook_old/recipebook_preset.tscn new file mode 100644 index 00000000..4f02c608 --- /dev/null +++ b/frontend/Savor-22b/scenes/house/recipebook_old/recipebook_preset.tscn @@ -0,0 +1,455 @@ +[gd_scene load_steps=12 format=3 uid="uid://v71sxnap5pkb"] + +[ext_resource type="StyleBox" uid="uid://b2nqsuwp80vsg" path="res://scenes/house/recipebook/recipe_style_box_flat.tres" id="1_707n0"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tvose"] +bg_color = Color(0.94902, 0.694118, 0.0784314, 1) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color(0, 0, 0, 1) +corner_radius_top_left = 50 +corner_radius_top_right = 50 +corner_radius_bottom_right = 50 +corner_radius_bottom_left = 50 +shadow_size = 5 + +[sub_resource type="FontVariation" id="FontVariation_eybux"] +variation_embolden = -0.3 + +[sub_resource type="SystemFont" id="SystemFont_ardk6"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jup0i"] +bg_color = Color(0.94902, 0.596078, 0.0784314, 1) +corner_radius_top_left = 20 +corner_radius_top_right = 20 +corner_radius_bottom_right = 20 +corner_radius_bottom_left = 20 + +[sub_resource type="FontVariation" id="FontVariation_g1ith"] +variation_embolden = -0.4 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ym4cf"] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 30 +corner_radius_top_right = 30 +corner_radius_bottom_right = 30 +corner_radius_bottom_left = 30 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rle7u"] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 15 +corner_radius_top_right = 15 +corner_radius_bottom_right = 15 +corner_radius_bottom_left = 15 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ot8sp"] +bg_color = Color(0.94902, 0.694118, 0.0784314, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(0, 0, 0, 1) +corner_radius_top_left = 50 +corner_radius_top_right = 50 +corner_radius_bottom_right = 50 +corner_radius_bottom_left = 50 +shadow_size = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ngbpx"] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 15 +corner_radius_top_right = 15 +corner_radius_bottom_right = 15 +corner_radius_bottom_left = 15 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_61pm2"] +bg_color = Color(0, 0, 0, 1) +corner_radius_top_left = 30 +corner_radius_top_right = 30 +corner_radius_bottom_right = 30 +corner_radius_bottom_left = 30 + +[node name="Recipebook" type="Control"] +custom_minimum_size = Vector2(1600, 900) +layout_mode = 3 +anchors_preset = 0 +offset_right = 1600.0 +offset_bottom = 900.0 + +[node name="background" type="Panel" parent="."] +custom_minimum_size = Vector2(1600, 900) +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_tvose") + +[node name="M" type="MarginContainer" parent="background"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 60 +theme_override_constants/margin_top = 20 +theme_override_constants/margin_right = 60 +theme_override_constants/margin_bottom = 30 + +[node name="V" type="VBoxContainer" parent="background/M"] +layout_mode = 2 + +[node name="Title" type="Label" parent="background/M/V"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 70 +text = "조리 가능한 레시피" + +[node name="Description" type="HBoxContainer" parent="background/M/V"] +layout_mode = 2 +size_flags_vertical = 4 +alignment = 1 + +[node name="Desc" type="Label" parent="background/M/V/Description"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_fonts/font = SubResource("FontVariation_eybux") +theme_override_font_sizes/font_size = 45 +text = "현재 설치된 조리도구" + +[node name="ription" type="Label" parent="background/M/V/Description"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_fonts/font = SubResource("SystemFont_ardk6") +theme_override_font_sizes/font_size = 45 +text = "[ 중화 웍, 후라이팬, ... ]" + +[node name="S" type="ScrollContainer" parent="background/M/V"] +custom_minimum_size = Vector2(2.08165e-12, 580) +layout_mode = 2 + +[node name="G" type="GridContainer" parent="background/M/V/S"] +layout_mode = 2 +theme_override_constants/h_separation = 50 +columns = 2 + +[node name="Recipe" type="Panel" parent="background/M/V/S/G"] +custom_minimum_size = Vector2(700, 550) +layout_mode = 2 +theme_override_styles/panel = ExtResource("1_707n0") + +[node name="M" type="MarginContainer" parent="background/M/V/S/G/Recipe"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 50 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 50 +theme_override_constants/margin_bottom = 10 + +[node name="V" type="VBoxContainer" parent="background/M/V/S/G/Recipe/M"] +layout_mode = 2 + +[node name="Title" type="HBoxContainer" parent="background/M/V/S/G/Recipe/M/V"] +layout_mode = 2 +size_flags_horizontal = 0 + +[node name="Name" type="Label" parent="background/M/V/S/G/Recipe/M/V/Title"] +layout_mode = 2 +theme_override_font_sizes/font_size = 40 +text = "[트러플 짜장면] 레시피" + +[node name="insufficient" type="Label" parent="background/M/V/S/G/Recipe/M/V/Title"] +layout_mode = 2 +theme_override_font_sizes/font_size = 40 +text = "(재료부족)" + +[node name="Blockreq" type="Label" parent="background/M/V/S/G/Recipe/M/V"] +layout_mode = 2 +theme_override_colors/font_color = Color(1, 0.541176, 0, 1) +theme_override_font_sizes/font_size = 30 +text = "소요 블록 N 블록" + +[node name="Space" type="MarginContainer" parent="background/M/V/S/G/Recipe/M/V"] +layout_mode = 2 +theme_override_constants/margin_top = 10 + +[node name="Description" type="VBoxContainer" parent="background/M/V/S/G/Recipe/M/V"] +layout_mode = 2 +theme_override_constants/separation = 15 + +[node name="T1" type="Label" parent="background/M/V/S/G/Recipe/M/V/Description"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +text = "[조리도구]" + +[node name="Tools" type="HBoxContainer" parent="background/M/V/S/G/Recipe/M/V/Description"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="Availabletools" type="Button" parent="background/M/V/S/G/Recipe/M/V/Description/Tools"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[-- -] +사용 가능" + +[node name="Availabletools2" type="Button" parent="background/M/V/S/G/Recipe/M/V/Description/Tools"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[-- -] +사용 가능" + +[node name="T2" type="Label" parent="background/M/V/S/G/Recipe/M/V/Description"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +text = "[식재료]" + +[node name="Ingredients" type="HBoxContainer" parent="background/M/V/S/G/Recipe/M/V/Description"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="Ing" type="Button" parent="background/M/V/S/G/Recipe/M/V/Description/Ingredients"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[춘장] +보유중" + +[node name="NoIng" type="Button" parent="background/M/V/S/G/Recipe/M/V/Description/Ingredients"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") + +[node name="Desc" type="VBoxContainer" parent="background/M/V/S/G/Recipe/M/V/Description/Ingredients/NoIng"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = -2 +alignment = 1 + +[node name="Name" type="Label" parent="background/M/V/S/G/Recipe/M/V/Description/Ingredients/NoIng/Desc"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +text = "[라드]" + +[node name="No" type="Label" parent="background/M/V/S/G/Recipe/M/V/Description/Ingredients/NoIng/Desc"] +layout_mode = 2 +size_flags_horizontal = 4 +theme_override_colors/font_color = Color(1, 0, 0, 1) +theme_override_fonts/font = SubResource("FontVariation_g1ith") +theme_override_font_sizes/font_size = 25 +text = "없음" + +[node name="Recipe2" type="Panel" parent="background/M/V/S/G"] +custom_minimum_size = Vector2(700, 550) +layout_mode = 2 +theme_override_styles/panel = ExtResource("1_707n0") + +[node name="M" type="MarginContainer" parent="background/M/V/S/G/Recipe2"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 50 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 50 +theme_override_constants/margin_bottom = 10 + +[node name="V" type="VBoxContainer" parent="background/M/V/S/G/Recipe2/M"] +layout_mode = 2 + +[node name="Title" type="HBoxContainer" parent="background/M/V/S/G/Recipe2/M/V"] +layout_mode = 2 +size_flags_horizontal = 0 + +[node name="Name" type="Label" parent="background/M/V/S/G/Recipe2/M/V/Title"] +layout_mode = 2 +theme_override_font_sizes/font_size = 40 +text = "[트러플 짜장면] 레시피" + +[node name="insufficient" type="Label" parent="background/M/V/S/G/Recipe2/M/V/Title"] +layout_mode = 2 +theme_override_font_sizes/font_size = 40 +text = "(재료부족)" + +[node name="Blockreq" type="Label" parent="background/M/V/S/G/Recipe2/M/V"] +layout_mode = 2 +theme_override_colors/font_color = Color(1, 0.541176, 0, 1) +theme_override_font_sizes/font_size = 30 +text = "소요 블록 N 블록" + +[node name="Space" type="MarginContainer" parent="background/M/V/S/G/Recipe2/M/V"] +layout_mode = 2 +theme_override_constants/margin_top = 10 + +[node name="Description" type="VBoxContainer" parent="background/M/V/S/G/Recipe2/M/V"] +layout_mode = 2 +theme_override_constants/separation = 15 + +[node name="T1" type="Label" parent="background/M/V/S/G/Recipe2/M/V/Description"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +text = "[조리도구]" + +[node name="Tools" type="HBoxContainer" parent="background/M/V/S/G/Recipe2/M/V/Description"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="Availabletools" type="Button" parent="background/M/V/S/G/Recipe2/M/V/Description/Tools"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[-- -] +사용 가능" + +[node name="Availabletools2" type="Button" parent="background/M/V/S/G/Recipe2/M/V/Description/Tools"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[-- -] +사용 가능" + +[node name="T2" type="Label" parent="background/M/V/S/G/Recipe2/M/V/Description"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +text = "[식재료]" + +[node name="Ingredients" type="HBoxContainer" parent="background/M/V/S/G/Recipe2/M/V/Description"] +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="Ing" type="Button" parent="background/M/V/S/G/Recipe2/M/V/Description/Ingredients"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[춘장] +보유중" + +[node name="Ing2" type="Button" parent="background/M/V/S/G/Recipe2/M/V/Description/Ingredients"] +custom_minimum_size = Vector2(180, 110) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_jup0i") +text = "[춘장] +보유중" + +[node name="BottomMenu" type="HBoxContainer" parent="background/M/V"] +layout_mode = 2 +theme_override_constants/separation = 850 + +[node name="Close" type="Button" parent="background/M/V/BottomMenu"] +custom_minimum_size = Vector2(150, 60) +layout_mode = 2 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_ym4cf") +text = "닫기" + +[node name="Cook" type="Button" parent="background/M/V/BottomMenu"] +custom_minimum_size = Vector2(450, 60) +layout_mode = 2 +size_flags_horizontal = 8 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_rle7u") +text = "선택한 레시피로 조리하기" + +[node name="Popups" type="Control" parent="."] +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="SelectIngredients" type="Panel" parent="Popups"] +custom_minimum_size = Vector2(400, 300) +layout_mode = 1 +offset_left = 1253.0 +offset_top = 567.0 +offset_right = 1653.0 +offset_bottom = 867.0 +theme_override_styles/panel = SubResource("StyleBoxFlat_ot8sp") + +[node name="M" type="MarginContainer" parent="Popups/SelectIngredients"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 30 +theme_override_constants/margin_top = 15 +theme_override_constants/margin_right = 30 +theme_override_constants/margin_bottom = 15 + +[node name="V" type="VBoxContainer" parent="Popups/SelectIngredients/M"] +layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="Title" type="Label" parent="Popups/SelectIngredients/M/V"] +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 30 +text = "현재 소유중인 [-- -]" + +[node name="Ingredients" type="VBoxContainer" parent="Popups/SelectIngredients/M/V"] +layout_mode = 2 + +[node name="RankB" type="Button" parent="Popups/SelectIngredients/M/V/Ingredients"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_ngbpx") +text = "B 등급 [1개]" + +[node name="RankA" type="Button" parent="Popups/SelectIngredients/M/V/Ingredients"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_ngbpx") +text = "A 등급 [3개]" + +[node name="RankS" type="Button" parent="Popups/SelectIngredients/M/V/Ingredients"] +layout_mode = 2 +theme_override_font_sizes/font_size = 35 +theme_override_styles/normal = SubResource("StyleBoxFlat_ngbpx") +text = "S 등급 [6개]" + +[node name="Button" type="Button" parent="Popups/SelectIngredients/M/V"] +custom_minimum_size = Vector2(270, 50) +layout_mode = 2 +size_flags_horizontal = 8 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_font_sizes/font_size = 25 +theme_override_styles/normal = SubResource("StyleBoxFlat_61pm2") +text = "선택한 등급으로 설정" diff --git a/frontend/Savor-22b/scenes/shop/systemshop.gd b/frontend/Savor-22b/scenes/shop/systemshop.gd index b12dc0a1..41cf8362 100644 --- a/frontend/Savor-22b/scenes/shop/systemshop.gd +++ b/frontend/Savor-22b/scenes/shop/systemshop.gd @@ -6,7 +6,7 @@ const SHOP_DONE_POPUP = preload("res://scenes/shop/done_popup.tscn") const Gql_query = preload("res://gql/query.gd") -@onready var shoplist = $M/H/C/M/Lists +@onready var shoplist = $M/H/C/M/S/Lists @onready var popup = $Popups var shopitems = [] diff --git a/frontend/Savor-22b/scenes/shop/systemshop.tscn b/frontend/Savor-22b/scenes/shop/systemshop.tscn index 9d379883..006f26fa 100644 --- a/frontend/Savor-22b/scenes/shop/systemshop.tscn +++ b/frontend/Savor-22b/scenes/shop/systemshop.tscn @@ -73,7 +73,11 @@ theme_override_constants/margin_top = 20 theme_override_constants/margin_right = 20 theme_override_constants/margin_bottom = 20 -[node name="Lists" type="VBoxContainer" parent="M/H/C/M"] +[node name="S" type="ScrollContainer" parent="M/H/C/M"] +layout_mode = 2 +horizontal_scroll_mode = 0 + +[node name="Lists" type="VBoxContainer" parent="M/H/C/M/S"] layout_mode = 2 [node name="Popups" type="Control" parent="."] diff --git a/frontend/Savor-22b/scripts/scenes/house.gd b/frontend/Savor-22b/scripts/scenes/house.gd index 6843e77a..e412c292 100644 --- a/frontend/Savor-22b/scripts/scenes/house.gd +++ b/frontend/Savor-22b/scripts/scenes/house.gd @@ -75,7 +75,11 @@ func clear_popup(): func _on_recipe_button_button_down(): clear_popup() + if is_instance_valid(subscene): + for scene in subscene.get_children(): + scene.queue_free() var Recipebookarea = MarginContainer.new() + #setting margincontainer constants Recipebookarea.add_theme_constant_override("margin_top", 20) Recipebookarea.add_theme_constant_override("margin_bottom", 20) Recipebookarea.add_theme_constant_override("margin_left", 140) @@ -98,6 +102,7 @@ func _on_village_button_button_down(): func _on_refresh_button_button_down(): Intro._query_user_state() + clear_popup() if is_instance_valid(subscene): for scene in subscene.get_children(): scene.queue_free() diff --git a/frontend/Savor-22b/scripts/scenes/intro.gd b/frontend/Savor-22b/scripts/scenes/intro.gd index ef73f96a..ef55abca 100644 --- a/frontend/Savor-22b/scripts/scenes/intro.gd +++ b/frontend/Savor-22b/scripts/scenes/intro.gd @@ -182,6 +182,7 @@ func _query_recipe(): var query = GQLQuery.new("recipe").set_props([ "id", "name", + "requiredBlockCount", GQLQuery.new("ingredientIDList").set_props([ "id", "name", @@ -189,6 +190,14 @@ func _query_recipe(): GQLQuery.new("foodIDList").set_props([ "id", "name" + ]), + GQLQuery.new("requiredKitchenEquipmentCategoryList").set_props([ + "id", + "name", + ]), + GQLQuery.new("resultFood").set_props([ + "id", + "name", ]) ]) print(query.serialize())