Half-baked state. Most of the UI is mostly done, but the integration with Grist (or any other data provider) is still missing.
18 lines
322 B
GDScript
18 lines
322 B
GDScript
extends Container
|
|
|
|
@export var entry: CartEntry
|
|
|
|
func _ready() -> void:
|
|
update_info()
|
|
|
|
func update_info():
|
|
%Label.text = "%s (%sg / %.2f€)" % [
|
|
entry.article_info.text,
|
|
entry.weight_grams,
|
|
entry.price_cents / 100.0
|
|
]
|
|
|
|
func _on_delete_button():
|
|
Global.cart.pop_at(entry.cart_index)
|
|
Global.cart_updated.emit()
|