This repository has been archived on 2025-12-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
food-coop-waage/cart_list.gd
Felix 4b1796250c Initial commit
Half-baked state. Most of the UI is mostly done, but the integration
with Grist (or any other data provider) is still missing.
2025-05-11 19:19:24 +02:00

19 lines
406 B
GDScript

extends VBoxContainer
const list_entry_scene = preload("res://cart_list_entry.tscn")
func _ready() -> void:
Global.cart_updated.connect(_on_cart_updated)
_on_cart_updated()
func _on_cart_updated():
for c in get_children():
remove_child(c)
c.queue_free()
var list_entry
for entry in Global.cart:
list_entry = list_entry_scene.instantiate()
list_entry.entry = entry
add_child(list_entry)