yagvm/UI/Components/ReleaseItem.gd

30 lines
752 B
GDScript3
Raw Normal View History

2023-05-25 11:30:21 +00:00
extends HBoxContainer
class_name ReleaseItem
@onready var version_label: Label = %VersionLabel
@onready var install_button: Button = %InstallButton
@onready var install_templates_button: Button = %InstallTemplatesButton
var version: String
signal install_button_pressed
signal install_templates_button_pressed
func _ready() -> void:
install_button.pressed.connect(func(): install_button_pressed.emit())
install_templates_button.pressed.connect(func(): install_templates_button_pressed.emit())
func set_version(v: String) -> void:
version = v
version_label.text = v
func set_install_button_disabled(d: bool) -> void:
install_button.disabled = d
func set_templates_button_disabled(d: bool) -> void:
install_templates_button.disabled = d