diff --git a/frontend/Savor-22b/scenes/addressdisplay.gd b/frontend/Savor-22b/scenes/addressdisplay.gd new file mode 100644 index 00000000..dda7dbd6 --- /dev/null +++ b/frontend/Savor-22b/scenes/addressdisplay.gd @@ -0,0 +1,7 @@ +extends LineEdit + + +# Called when the node enters the scene tree for the first time. +func _ready(): + self.text = str(GlobalSigner.signer_address) + diff --git a/frontend/Savor-22b/scenes/farm.tscn b/frontend/Savor-22b/scenes/farm.tscn index e1142e31..c76e1aec 100644 --- a/frontend/Savor-22b/scenes/farm.tscn +++ b/frontend/Savor-22b/scenes/farm.tscn @@ -92,19 +92,19 @@ layout_mode = 2 layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = "Home" +text = "부엌으로" [node name="InventoryButton" type="Button" parent="MC/HC/VBoxContainer/MarginContainer/VBoxContainer"] layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = "Inventory" +text = "인벤토리" [node name="RefreshButton" type="Button" parent="MC/HC/VBoxContainer/MarginContainer/VBoxContainer"] layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = "Refresh" +text = "새로고침" [node name="Popups" type="Control" parent="."] anchors_preset = 0 diff --git a/frontend/Savor-22b/scenes/house/house.tscn b/frontend/Savor-22b/scenes/house/house.tscn index 3c3244ac..6d166b04 100644 --- a/frontend/Savor-22b/scenes/house/house.tscn +++ b/frontend/Savor-22b/scenes/house/house.tscn @@ -49,35 +49,42 @@ theme_override_constants/margin_bottom = 20 custom_minimum_size = Vector2(500, 2.08165e-12) layout_mode = 2 size_flags_horizontal = 8 -columns = 2 +columns = 5 [node name="FarmButton" type="Button" parent="M/V/menus/V"] custom_minimum_size = Vector2(200, 2.08165e-12) layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = "Farm" +text = "밭으로" + +[node name="VillageButton" type="Button" parent="M/V/menus/V"] +custom_minimum_size = Vector2(200, 2.08165e-12) +layout_mode = 2 +size_flags_vertical = 0 +theme_override_font_sizes/font_size = 50 +text = " 마을로 " [node name="RecipeButton" type="Button" parent="M/V/menus/V"] custom_minimum_size = Vector2(200, 2.08165e-12) layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = " Recipe " +text = " 레시피북 " [node name="InventoryButton" type="Button" parent="M/V/menus/V"] custom_minimum_size = Vector2(200, 2.08165e-12) layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = "Inventory" +text = " 인벤토리 " [node name="RefreshButton" type="Button" parent="M/V/menus/V"] custom_minimum_size = Vector2(200, 2.08165e-12) layout_mode = 2 size_flags_vertical = 0 theme_override_font_sizes/font_size = 50 -text = "Refresh" +text = " 새로고침 " [node name="subscene" type="MarginContainer" parent="M/V"] layout_mode = 2 @@ -92,5 +99,6 @@ offset_right = 40.0 offset_bottom = 40.0 [connection signal="button_down" from="M/V/menus/V/FarmButton" to="." method="_on_farm_button_button_down"] +[connection signal="button_down" from="M/V/menus/V/VillageButton" to="." method="_on_village_button_button_down"] [connection signal="button_down" from="M/V/menus/V/InventoryButton" to="." method="_on_inventory_button_button_down"] [connection signal="button_down" from="M/V/menus/V/RefreshButton" to="." method="_on_refresh_button_button_down"] diff --git a/frontend/Savor-22b/scenes/house/house_inventory.gd b/frontend/Savor-22b/scenes/house/house_inventory.gd index 780438b8..649b4b20 100644 --- a/frontend/Savor-22b/scenes/house/house_inventory.gd +++ b/frontend/Savor-22b/scenes/house/house_inventory.gd @@ -6,6 +6,7 @@ const KITCHEN_SHOP = preload("res://scenes/house/kitchenshop.tscn") @onready var panel = $M/V/Panel/C signal buysignal +signal closeall func _ready(): _on_tools_button_down() @@ -32,6 +33,7 @@ func clear_popup(): pop.queue_free() func closetab(): + closeall.emit() queue_free() func popup(): diff --git a/frontend/Savor-22b/scenes/intro.tscn b/frontend/Savor-22b/scenes/intro.tscn index b828fbcb..f95dcad7 100644 --- a/frontend/Savor-22b/scenes/intro.tscn +++ b/frontend/Savor-22b/scenes/intro.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=3 uid="uid://cg773cnsx4rb0"] +[gd_scene load_steps=3 format=3 uid="uid://cg773cnsx4rb0"] [ext_resource type="Script" path="res://scripts/scenes/intro.gd" id="1_0m54y"] +[ext_resource type="Script" path="res://scenes/addressdisplay.gd" id="2_63u45"] [node name="Intro" type="Control"] layout_mode = 3 @@ -96,5 +97,30 @@ grow_vertical = 2 theme_override_font_sizes/font_size = 70 text = "Play" +[node name="Info" type="Control" parent="."] +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="H" type="HBoxContainer" parent="Info"] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Info/H"] +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 32 +text = "Address : " + +[node name="addressdisplay" type="LineEdit" parent="Info/H"] +custom_minimum_size = Vector2(850, 2.08165e-12) +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 32 +placeholder_text = "address_info" +max_length = 100 +script = ExtResource("2_63u45") + [connection signal="button_down" from="QuitButtonContainer/Button" to="." method="_on_quit_button_button_down"] [connection signal="button_down" from="PlayButtonContainer/Button" to="." method="_on_play_button_button_down"] diff --git a/frontend/Savor-22b/scenes/select_house.tscn b/frontend/Savor-22b/scenes/select_house.tscn index 36cda547..c0dc9667 100644 --- a/frontend/Savor-22b/scenes/select_house.tscn +++ b/frontend/Savor-22b/scenes/select_house.tscn @@ -1,7 +1,13 @@ -[gd_scene load_steps=2 format=3 uid="uid://dy1e0tpo1lsby"] +[gd_scene load_steps=4 format=3 uid="uid://dy1e0tpo1lsby"] [ext_resource type="Script" path="res://scripts/scenes/select_house.gd" id="1_012c4"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cba5k"] +bg_color = Color(0.00392157, 0.00392157, 0.00392157, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_epcma"] +bg_color = Color(0, 0, 0, 1) + [node name="SelectHouse" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -27,46 +33,32 @@ offset_right = 1920.0 offset_bottom = 140.0 theme_override_constants/margin_left = 20 theme_override_constants/margin_top = 20 -theme_override_constants/margin_right = 20 +theme_override_constants/margin_right = 30 theme_override_constants/margin_bottom = 20 -[node name="Control" type="Control" parent="TopMenuMarginContainer"] +[node name="Title" type="Label" parent="TopMenuMarginContainer"] layout_mode = 2 +size_flags_horizontal = 0 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 60 +text = " 집 짓기 화면" -[node name="HomeButtonContainer" type="ColorRect" parent="TopMenuMarginContainer/Control"] -layout_mode = 0 -offset_right = 410.0 -offset_bottom = 100.0 -size_flags_horizontal = 4 -color = Color(0, 0, 0, 1) +[node name="HBoxContainer" type="HBoxContainer" parent="TopMenuMarginContainer"] +layout_mode = 2 +theme_override_constants/separation = 50 +alignment = 2 -[node name="Button" type="Button" parent="TopMenuMarginContainer/Control/HomeButtonContainer"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 +[node name="HomeButton" type="Button" parent="TopMenuMarginContainer/HBoxContainer"] +layout_mode = 2 theme_override_font_sizes/font_size = 70 -text = "Home" - -[node name="BackButtonContainer2" type="ColorRect" parent="TopMenuMarginContainer/Control"] -layout_mode = 0 -offset_left = 540.0 -offset_right = 950.0 -offset_bottom = 100.0 -size_flags_horizontal = 4 -color = Color(0, 0, 0, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_cba5k") +text = " 마을 선택으로 " -[node name="BackButton" type="Button" parent="TopMenuMarginContainer/Control/BackButtonContainer2"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 +[node name="BackButton" type="Button" parent="TopMenuMarginContainer/HBoxContainer"] +layout_mode = 2 theme_override_font_sizes/font_size = 70 -text = "Back" +theme_override_styles/normal = SubResource("StyleBoxFlat_epcma") +text = " 마을 전체 보기 " [node name="BottomMenuMarginContainer" type="MarginContainer" parent="."] layout_mode = 0 @@ -104,7 +96,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 70 -text = "Build" +text = "집 짓기" [node name="RefreshButtonContainer" type="ColorRect" parent="BottomMenuMarginContainer/Control"] layout_mode = 1 @@ -129,7 +121,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 70 -text = "Refresh" +text = "새로고침" [node name="MarginContainer" type="MarginContainer" parent="."] layout_mode = 0 @@ -173,8 +165,7 @@ offset_top = 300.0 offset_right = 640.0 offset_bottom = 340.0 -[connection signal="pressed" from="TopMenuMarginContainer/Control/HomeButtonContainer/Button" to="." method="_on_button_pressed"] -[connection signal="button_down" from="TopMenuMarginContainer/Control/BackButtonContainer2/BackButton" to="." method="_on_back_button_button_down"] +[connection signal="pressed" from="TopMenuMarginContainer/HBoxContainer/HomeButton" to="." method="_on_button_pressed"] +[connection signal="button_down" from="TopMenuMarginContainer/HBoxContainer/BackButton" to="." method="_on_back_button_button_down"] [connection signal="button_down" from="BottomMenuMarginContainer/Control/BuildButtonContainer/BuildButton" to="." method="_on_build_button_button_down"] [connection signal="button_down" from="BottomMenuMarginContainer/Control/RefreshButtonContainer/RefreshButton" to="." method="_on_refresh_button_button_down"] -[connection signal="button_down" from="BottomMenuMarginContainer/Control/RefreshButtonContainer/RefreshButton" to="." method="_on_build_button_button_down"] diff --git a/frontend/Savor-22b/scenes/village_view.tscn b/frontend/Savor-22b/scenes/village_view.tscn index 3f3c49ee..97b6c371 100644 --- a/frontend/Savor-22b/scenes/village_view.tscn +++ b/frontend/Savor-22b/scenes/village_view.tscn @@ -35,7 +35,7 @@ layout_mode = 2 [node name="HomeButtonContainer" type="ColorRect" parent="TopMenuMarginContainer/Control"] layout_mode = 0 -offset_right = 410.0 +offset_right = 450.0 offset_bottom = 100.0 size_flags_horizontal = 4 color = Color(0, 0, 0, 1) @@ -48,12 +48,12 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 70 -text = "Home" +text = " 마을 선택으로 " [node name="FarmButtonContainer" type="ColorRect" parent="TopMenuMarginContainer/Control"] layout_mode = 0 offset_left = 460.0 -offset_right = 870.0 +offset_right = 910.0 offset_bottom = 100.0 size_flags_horizontal = 4 color = Color(0, 0, 0, 1) @@ -66,7 +66,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 70 -text = "Farm" +text = " 내 밭으로 가기 " [node name="BottomMenuMarginContainer" type="MarginContainer" parent="."] layout_mode = 0 @@ -104,7 +104,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 70 -text = "Enter Selected Dungeon" +text = "던전 진입하기" [node name="MarginContainer" type="MarginContainer" parent="."] layout_mode = 0 diff --git a/frontend/Savor-22b/scripts/scenes/house.gd b/frontend/Savor-22b/scripts/scenes/house.gd index a399beff..9e707b0e 100644 --- a/frontend/Savor-22b/scripts/scenes/house.gd +++ b/frontend/Savor-22b/scripts/scenes/house.gd @@ -15,8 +15,14 @@ func _ready(): func _on_inventory_button_button_down(): + clear_popup() + if is_instance_valid(subscene): + for scene in subscene.get_children(): + scene.queue_free() + var inventory = HOUSE_INVENTORY.instantiate() inventory.buysignal.connect(buypopup) + inventory.closeall.connect(clear_popup) subscene.add_child(inventory) @@ -77,3 +83,7 @@ func _on_refresh_button_button_down(): func _on_farm_button_button_down(): get_tree().change_scene_to_file("res://scenes/farm.tscn") + + +func _on_village_button_button_down(): + get_tree().change_scene_to_file("res://scenes/village_view.tscn") diff --git a/frontend/Savor-22b/scripts/scenes/intro.gd b/frontend/Savor-22b/scripts/scenes/intro.gd index 244fff15..1adacbfc 100644 --- a/frontend/Savor-22b/scripts/scenes/intro.gd +++ b/frontend/Savor-22b/scripts/scenes/intro.gd @@ -1,12 +1,13 @@ extends Control + func _ready(): print("intro scene ready") _query_villages() _query_user_state() _query_assets() _query_shop() - + func _on_quit_button_button_down(): print("quit button down") @@ -175,4 +176,3 @@ func _query_shop(): ) add_child(query_executor) query_executor.run({}) - diff --git a/frontend/Savor-22b/ui/farm_action_popup.gd b/frontend/Savor-22b/ui/farm_action_popup.gd index 979f01cd..d09618a0 100644 --- a/frontend/Savor-22b/ui/farm_action_popup.gd +++ b/frontend/Savor-22b/ui/farm_action_popup.gd @@ -10,3 +10,7 @@ func _ready(): func _on_remove_button_down(): button_down_remove.emit() + + +func _on_cancel_button_down(): + queue_free() diff --git a/frontend/Savor-22b/ui/farm_action_popup.tscn b/frontend/Savor-22b/ui/farm_action_popup.tscn index 88e7d26a..b08aea7e 100644 --- a/frontend/Savor-22b/ui/farm_action_popup.tscn +++ b/frontend/Savor-22b/ui/farm_action_popup.tscn @@ -32,6 +32,13 @@ alignment = 1 layout_mode = 2 theme_override_font_sizes/font_size = 50 theme_override_styles/normal = SubResource("StyleBoxFlat_yesvl") -text = "제거하기" +text = "종자 제거하기" + +[node name="Cancel" type="Button" parent="M/V"] +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +theme_override_styles/normal = SubResource("StyleBoxFlat_yesvl") +text = "행동 취소" [connection signal="button_down" from="M/V/Remove" to="." method="_on_remove_button_down"] +[connection signal="button_down" from="M/V/Cancel" to="." method="_on_cancel_button_down"]