Half-baked state. Most of the UI is mostly done, but the integration with Grist (or any other data provider) is still missing.
27 lines
713 B
GDScript
27 lines
713 B
GDScript
extends Container
|
|
|
|
func _ready() -> void:
|
|
%DebugScaleSlider.value_changed.connect(Global.set_scale)
|
|
|
|
%TaraButton.pressed.connect(_on_tara_button)
|
|
%OkayButton.pressed.connect(Global.confirm_entry)
|
|
%FinishButton.pressed.connect(_on_finish_button)
|
|
|
|
Global.cart_updated.connect(_on_cart_updated)
|
|
|
|
Global.weights_updated.emit() # Replace placeholder texts
|
|
|
|
func _on_tara_button():
|
|
var popup = load("res://tara_popup.tscn").instantiate()
|
|
add_child(popup)
|
|
popup.popup_centered()
|
|
|
|
func _on_finish_button():
|
|
var popup = load("res://finish_popup.tscn").instantiate()
|
|
add_child(popup)
|
|
popup.popup_centered()
|
|
|
|
|
|
func _on_cart_updated():
|
|
%CartTotal.text = "Summe: %.2f€" % (Global.cart_total_cents / 100.0)
|