diff --git a/UI/Components/InstallItem.tscn b/UI/Components/InstallItem.tscn index 8f0548a..2064023 100644 --- a/UI/Components/InstallItem.tscn +++ b/UI/Components/InstallItem.tscn @@ -26,6 +26,7 @@ layout_mode = 2 size_flags_horizontal = 3 mouse_filter = 1 vertical_alignment = 1 +clip_text = true [node name="EditItemButton" type="Button" parent="."] unique_name_in_owner = true diff --git a/UI/Components/ReleaseItem.gd b/UI/Components/ReleaseItem.gd new file mode 100644 index 0000000..58946fb --- /dev/null +++ b/UI/Components/ReleaseItem.gd @@ -0,0 +1,29 @@ +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 diff --git a/UI/Components/ReleaseItem.tscn b/UI/Components/ReleaseItem.tscn new file mode 100644 index 0000000..afb1036 --- /dev/null +++ b/UI/Components/ReleaseItem.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=2 format=3 uid="uid://wpersx0asfqo"] + +[ext_resource type="Script" path="res://UI/Components/ReleaseItem.gd" id="1_r5q2c"] + +[node name="ReleaseItem" type="HBoxContainer"] +offset_right = 512.0 +offset_bottom = 39.0 +size_flags_horizontal = 3 +script = ExtResource("1_r5q2c") + +[node name="VersionLabel" type="Label" parent="."] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +layout_mode = 2 +alignment = 2 + +[node name="InstallButton" type="Button" parent="HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Install" + +[node name="InstallTemplatesButton" type="Button" parent="HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Export Templates" diff --git a/UI/Dialogs/GroupEditDialog.tscn b/UI/Dialogs/GroupEditDialog.tscn index 6f815e7..555dbcb 100644 --- a/UI/Dialogs/GroupEditDialog.tscn +++ b/UI/Dialogs/GroupEditDialog.tscn @@ -10,10 +10,10 @@ size = Vector2i(678, 419) script = ExtResource("1_ic3yh") [node name="VBoxContainer" type="VBoxContainer" parent="."] -offset_left = 12.0 -offset_top = 12.0 -offset_right = 666.0 -offset_bottom = 366.0 +offset_left = 8.0 +offset_top = 8.0 +offset_right = 670.0 +offset_bottom = 370.0 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] layout_mode = 2 diff --git a/UI/Main/ReleasesView.gd b/UI/Main/ReleasesView.gd new file mode 100644 index 0000000..8b7037c --- /dev/null +++ b/UI/Main/ReleasesView.gd @@ -0,0 +1,3 @@ +extends VBoxContainer + +const ITEM_SCENE := preload("res://UI/Components/ReleaseItem.tscn") diff --git a/UI/Main/ReleasesView.tscn b/UI/Main/ReleasesView.tscn new file mode 100644 index 0000000..f3dadee --- /dev/null +++ b/UI/Main/ReleasesView.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=2 format=3 uid="uid://irfav51b5hf6"] + +[ext_resource type="Script" path="res://UI/Main/ReleasesView.gd" id="1_firao"] + +[node name="ReleasesView" type="VBoxContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_firao") + +[node name="Label" type="Label" parent="."] +layout_mode = 2 +text = "Releases" + +[node name="PanelContainer" type="PanelContainer" parent="."] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer"] +layout_mode = 2 + +[node name="ReleaseItemsContainer" type="VBoxContainer" parent="PanelContainer/ScrollContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="CenterContainer" type="CenterContainer" parent="."] +layout_mode = 2 + +[node name="FetchButton" type="Button" parent="CenterContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Fetch"