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:
17
cart_list_entry.gd
Normal file
17
cart_list_entry.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user