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:
19
tara_popup.gd
Normal file
19
tara_popup.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends PopupPanel
|
||||
|
||||
func _ready():
|
||||
%OnscreenKeyboard.show()
|
||||
%LineEdit.grab_focus()
|
||||
|
||||
%LineEdit.text_submitted.connect(Global.set_tara)
|
||||
%LineEdit.text_submitted.connect(hide.unbind(1))
|
||||
|
||||
%Button.pressed.connect(_on_button_pressed)
|
||||
Global.weights_updated.connect(_on_weight_update)
|
||||
_on_weight_update()
|
||||
|
||||
func _on_button_pressed():
|
||||
Global.set_tara(Global.scale_grams)
|
||||
hide()
|
||||
|
||||
func _on_weight_update():
|
||||
%Button.text = "%sg (Waage)" % Global.scale_grams
|
||||
Reference in New Issue
Block a user