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.
This commit is contained in:
18
cart_list.gd
Normal file
18
cart_list.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user