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/gui.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

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)