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