Skip to content

Commit

Permalink
fix: house inventory popup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kth1888 committed Mar 12, 2024
1 parent 2de3ba6 commit d15d375
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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
6 changes: 6 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

0 comments on commit d15d375

Please sign in to comment.