This repository was archived by the owner on Feb 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SVR-162: 집 화면의 인벤토리에서 조리기구 목록 조회 (#135)
* ui: added sysshop details * ui: house kitchen equipment ui components impl * feat: show kitchentools in inventory * feat: show kitchentool shoplist
- Loading branch information
Showing
14 changed files
with
431 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://bpobpaan3tquv"] | ||
|
||
[ext_resource type="Script" path="res://scripts/scenes/house.gd" id="1_suicg"] | ||
|
||
[node name="House" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_suicg") | ||
|
||
[node name="Background" type="ColorRect" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="Title" type="Label" parent="Background"] | ||
layout_mode = 0 | ||
offset_right = 40.0 | ||
offset_bottom = 23.0 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_font_sizes/font_size = 60 | ||
text = " 집 화면" | ||
|
||
[node name="M" type="MarginContainer" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="V" type="VBoxContainer" parent="M"] | ||
layout_mode = 2 | ||
|
||
[node name="menus" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
theme_override_constants/margin_left = 20 | ||
theme_override_constants/margin_top = 20 | ||
theme_override_constants/margin_right = 20 | ||
theme_override_constants/margin_bottom = 20 | ||
|
||
[node name="V" type="VBoxContainer" parent="M/V/menus"] | ||
layout_mode = 2 | ||
size_flags_horizontal = 8 | ||
|
||
[node name="RecipeButton" type="Button" parent="M/V/menus/V"] | ||
layout_mode = 2 | ||
size_flags_vertical = 0 | ||
theme_override_font_sizes/font_size = 50 | ||
text = "Recipe" | ||
|
||
[node name="InventoryButton" type="Button" parent="M/V/menus/V"] | ||
layout_mode = 2 | ||
size_flags_vertical = 0 | ||
theme_override_font_sizes/font_size = 50 | ||
text = "Inventory" | ||
|
||
[node name="RefreshButton" type="Button" parent="M/V/menus/V"] | ||
layout_mode = 2 | ||
size_flags_vertical = 0 | ||
theme_override_font_sizes/font_size = 50 | ||
text = "Refresh" | ||
|
||
[node name="subscene" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
size_flags_vertical = 3 | ||
theme_override_constants/margin_left = 20 | ||
theme_override_constants/margin_right = 20 | ||
theme_override_constants/margin_bottom = 20 | ||
|
||
[connection signal="button_down" from="M/V/menus/V/InventoryButton" to="." method="_on_inventory_button_button_down"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
extends Control | ||
|
||
const KITCHEN_TOOLS = preload("res://scenes/house/kitchentools.tscn") | ||
const KITCHEN_SHOP = preload("res://scenes/house/kitchenshop.tscn") | ||
|
||
@onready var panel = $M/V/Panel/C | ||
|
||
func _ready(): | ||
var kitchens = KITCHEN_TOOLS.instantiate() | ||
|
||
panel.add_child(kitchens) | ||
|
||
|
||
|
||
|
||
func _on_tools_button_down(): | ||
clear_popup() | ||
var kitchens = KITCHEN_TOOLS.instantiate() | ||
|
||
panel.add_child(kitchens) | ||
|
||
func _on_shop_button_down(): | ||
clear_popup() | ||
var kitchens = KITCHEN_SHOP.instantiate() | ||
|
||
panel.add_child(kitchens) | ||
|
||
func clear_popup(): | ||
if is_instance_valid(panel): | ||
for pop in panel.get_children(): | ||
pop.queue_free() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://dupiw5pjpvulw"] | ||
|
||
[ext_resource type="Script" path="res://scenes/house/house_inventory.gd" id="1_7w8e6"] | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dth2p"] | ||
bg_color = Color(0, 0, 0, 1) | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_50occ"] | ||
bg_color = Color(0, 0, 0, 1) | ||
|
||
[node name="HouseInventory" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_7w8e6") | ||
|
||
[node name="M" type="MarginContainer" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="V" type="VBoxContainer" parent="M"] | ||
layout_mode = 2 | ||
theme_override_constants/separation = -1 | ||
|
||
[node name="submenu" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
size_flags_horizontal = 0 | ||
size_flags_vertical = 0 | ||
|
||
[node name="H" type="HBoxContainer" parent="M/V/submenu"] | ||
layout_mode = 2 | ||
theme_override_constants/separation = 20 | ||
|
||
[node name="tools" type="Button" parent="M/V/submenu/H"] | ||
layout_mode = 2 | ||
theme_override_font_sizes/font_size = 40 | ||
theme_override_styles/normal = SubResource("StyleBoxFlat_dth2p") | ||
text = " 조리 도구 " | ||
|
||
[node name="shop" type="Button" parent="M/V/submenu/H"] | ||
layout_mode = 2 | ||
theme_override_font_sizes/font_size = 40 | ||
theme_override_styles/normal = SubResource("StyleBoxFlat_dth2p") | ||
text = " 도구 상점 " | ||
|
||
[node name="Panel" type="Panel" parent="M/V"] | ||
layout_mode = 2 | ||
size_flags_vertical = 3 | ||
theme_override_styles/panel = SubResource("StyleBoxFlat_50occ") | ||
|
||
[node name="C" type="CenterContainer" parent="M/V/Panel"] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[connection signal="button_down" from="M/V/submenu/H/tools" to="." method="_on_tools_button_down"] | ||
[connection signal="button_down" from="M/V/submenu/H/shop" to="." method="_on_shop_button_down"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends Control | ||
|
||
const TOOL = preload("res://scenes/house/tool.tscn") | ||
|
||
@onready var grid = $M/V/Items/G | ||
|
||
var list | ||
|
||
func _ready(): | ||
list = SceneContext.shop["kitchenEquipments"] | ||
|
||
for tool in list: | ||
var toolpanel = TOOL.instantiate() | ||
toolpanel.set_slottype() | ||
toolpanel.set_info(tool) | ||
grid.add_child(toolpanel) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://bsj3rpdgusned"] | ||
|
||
[ext_resource type="Script" path="res://scenes/house/kitchenshop.gd" id="1_aqlr8"] | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rk6tx"] | ||
bg_color = Color(1, 0.541176, 0, 1) | ||
|
||
[node name="Kitchenshop" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
offset_bottom = -357.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_aqlr8") | ||
|
||
[node name="M" type="MarginContainer" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="V" type="VBoxContainer" parent="M"] | ||
layout_mode = 2 | ||
size_flags_horizontal = 0 | ||
size_flags_vertical = 8 | ||
|
||
[node name="Items" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
theme_override_constants/margin_left = 50 | ||
theme_override_constants/margin_top = 50 | ||
theme_override_constants/margin_right = 50 | ||
theme_override_constants/margin_bottom = 50 | ||
|
||
[node name="G" type="GridContainer" parent="M/V/Items"] | ||
custom_minimum_size = Vector2(1780, 500) | ||
layout_mode = 2 | ||
theme_override_constants/h_separation = 50 | ||
theme_override_constants/v_separation = 50 | ||
columns = 5 | ||
|
||
[node name="Button" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
theme_override_constants/margin_right = 80 | ||
|
||
[node name="Close" type="Button" parent="M/V/Button"] | ||
layout_mode = 2 | ||
size_flags_horizontal = 8 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_font_sizes/font_size = 40 | ||
theme_override_styles/normal = SubResource("StyleBoxFlat_rk6tx") | ||
text = " 닫기 " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extends Control | ||
|
||
const TOOL = preload("res://scenes/house/tool.tscn") | ||
|
||
@onready var grid = $M/V/Items/G | ||
|
||
var tools | ||
|
||
func _ready(): | ||
tools = SceneContext.user_state.inventoryState["kitchenEquipmentStateList"] | ||
|
||
for tool in tools: | ||
var toolpanel = TOOL.instantiate() | ||
toolpanel.set_info(tool) | ||
grid.add_child(toolpanel) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://cwqquis7w31g7"] | ||
|
||
[ext_resource type="Script" path="res://scenes/house/kitchentools.gd" id="1_bkji1"] | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rk6tx"] | ||
bg_color = Color(1, 0.541176, 0, 1) | ||
|
||
[node name="Kitchentools" type="Control"] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
offset_bottom = -357.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
script = ExtResource("1_bkji1") | ||
|
||
[node name="M" type="MarginContainer" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="V" type="VBoxContainer" parent="M"] | ||
layout_mode = 2 | ||
size_flags_horizontal = 0 | ||
size_flags_vertical = 8 | ||
|
||
[node name="Items" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
theme_override_constants/margin_left = 50 | ||
theme_override_constants/margin_top = 50 | ||
theme_override_constants/margin_right = 50 | ||
theme_override_constants/margin_bottom = 50 | ||
|
||
[node name="G" type="GridContainer" parent="M/V/Items"] | ||
custom_minimum_size = Vector2(1780, 500) | ||
layout_mode = 2 | ||
theme_override_constants/h_separation = 50 | ||
theme_override_constants/v_separation = 50 | ||
columns = 5 | ||
|
||
[node name="Button" type="MarginContainer" parent="M/V"] | ||
layout_mode = 2 | ||
theme_override_constants/margin_right = 80 | ||
|
||
[node name="Close" type="Button" parent="M/V/Button"] | ||
layout_mode = 2 | ||
size_flags_horizontal = 8 | ||
theme_override_colors/font_color = Color(0, 0, 0, 1) | ||
theme_override_font_sizes/font_size = 40 | ||
theme_override_styles/normal = SubResource("StyleBoxFlat_rk6tx") | ||
text = " 닫기 " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
extends Panel | ||
|
||
@onready var toolname = $M/V/Name | ||
@onready var tooldesc = $M/V/Desc | ||
|
||
var info | ||
var isshop: bool = false | ||
|
||
var desc_format_string = "%s : %s | ||
%s : %s %s" | ||
|
||
func _ready(): | ||
_update_info() | ||
|
||
|
||
func _update_info(): | ||
if toolname == null: | ||
return | ||
|
||
if (isshop): | ||
toolname.text = info.name | ||
tooldesc.text = desc_format_string % [info.categoryType, info.categoryLabel, "Price", info.price, "BBG"] | ||
else: | ||
toolname.text = info.equipmentName | ||
tooldesc.text = info.stateId | ||
|
||
func set_info(info: Dictionary): | ||
self.info = info | ||
|
||
func set_slottype(): | ||
self.isshop = true | ||
_update_info() | ||
|
Oops, something went wrong.