extends Control var currency: Currency = null func _ready() -> void: UserContext.currency_inspect.connect(currency_inspect) UserContext.member_inspect.connect(member_inspect) update() func member_inspect(_m: CurrencyMemberSprite): visible = false func currency_inspect(c: Currency): currency = c update() func update(): if currency == null: visible = false return visible = true %InspectedCurrency.text = currency.name %CurrencyDescription.text = currency.description for child in %ProductionsList.get_children(): child.queue_free() for production in currency.production: var display := preload("res://gui/production_display.tscn").instantiate() display.production = production %ProductionsList.add_child(display) func _on_close_button_pressed() -> void: visible = false