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:
21
article_select_button.gd
Normal file
21
article_select_button.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends Node
|
||||
|
||||
@export var info: ArticleInfo
|
||||
|
||||
signal product_selected(id: String)
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
product_selected.emit(info.id)
|
||||
|
||||
func update_info():
|
||||
$VBoxContainer/Label.text = info.text
|
||||
$VBoxContainer/TextureRect.texture = info.icon
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
update_info()
|
||||
product_selected.connect(Global._on_product_selected)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
Reference in New Issue
Block a user