Skip to content

Commit

Permalink
SVR-315: 중간 피드백 버그 수정 (#140)
Browse files Browse the repository at this point in the history
* fix: fixed button text on build house scene

* fix: fixed wrong aciton during refresh in buildhouse

* fix: fixed scene movement buttons

* fix: added popup close in farmaction

* feat: added address display

* fix: house inventory popup issues
  • Loading branch information
kth1888 authored Mar 12, 2024
1 parent 6ee68f6 commit 63f24ff
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 55 deletions.
7 changes: 7 additions & 0 deletions frontend/Savor-22b/scenes/addressdisplay.gd
Original file line number Diff line number Diff line change
@@ -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)

6 changes: 3 additions & 3 deletions frontend/Savor-22b/scenes/farm.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 13 additions & 5 deletions frontend/Savor-22b/scenes/house/house.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
2 changes: 2 additions & 0 deletions frontend/Savor-22b/scenes/house/house_inventory.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -32,6 +33,7 @@ func clear_popup():
pop.queue_free()

func closetab():
closeall.emit()
queue_free()

func popup():
Expand Down
28 changes: 27 additions & 1 deletion frontend/Savor-22b/scenes/intro.tscn
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"]
67 changes: 29 additions & 38 deletions frontend/Savor-22b/scenes/select_house.tscn
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"]
10 changes: 5 additions & 5 deletions frontend/Savor-22b/scenes/village_view.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions frontend/Savor-22b/scripts/scenes/house.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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")
4 changes: 2 additions & 2 deletions frontend/Savor-22b/scripts/scenes/intro.gd
Original file line number Diff line number Diff line change
@@ -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")
Expand Down Expand Up @@ -175,4 +176,3 @@ func _query_shop():
)
add_child(query_executor)
query_executor.run({})

4 changes: 4 additions & 0 deletions frontend/Savor-22b/ui/farm_action_popup.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ func _ready():
func _on_remove_button_down():
button_down_remove.emit()



func _on_cancel_button_down():
queue_free()
9 changes: 8 additions & 1 deletion frontend/Savor-22b/ui/farm_action_popup.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 63f24ff

Please sign in to comment.