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_entry.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

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()