Half-baked state. Most of the UI is mostly done, but the integration with Grist (or any other data provider) is still missing.
19 lines
406 B
GDScript
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)
|