This commit is contained in:
rendo 2026-02-18 11:02:22 +05:00
commit c7788ed121
8 changed files with 100 additions and 32 deletions

14
ui/lab_menu.gd Normal file
View file

@ -0,0 +1,14 @@
extends Node
const LAB_DIR = "res://labs/"
func _ready() -> void:
for lab_file in ResourceLoader.list_directory(LAB_DIR):
if lab_file.ends_with("/"):
continue
var lab: Labwork = load(LAB_DIR + lab_file)
var button: Button = Button.new()
button.pressed.connect(LabRuntime.start_lab.bind(lab))
add_child(button)
button.text = lab.lab_name

1
ui/lab_menu.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://cbytg16bl0hsc

36
ui/tab_bar.tscn Normal file
View file

@ -0,0 +1,36 @@
[gd_scene format=3 uid="uid://dfn58nti8uxf0"]
[ext_resource type="Script" uid="uid://14snb0pu3b1t" path="res://src/ui/lab_tabs.gd" id="1_ieq68"]
[ext_resource type="PackedScene" uid="uid://opfal5aq2p5e" path="res://scenes/worktabs.tscn" id="2_hyo0h"]
[ext_resource type="PackedScene" uid="uid://be746nxgkc5ay" path="res://scenes/questions.tscn" id="3_lhsfi"]
[node name="TabBar" type="TabBar" unique_id=877427232]
size_flags_horizontal = 3
size_flags_vertical = 0
size_flags_stretch_ratio = 4.0
deselect_enabled = true
tab_count = 4
tab_0/title = "Ход работы"
tab_1/title = "Вопросы для самопроверки"
tab_2/title = "Отчёт"
tab_3/title = "Очистить"
script = ExtResource("1_ieq68")
[node name="Worktabs" parent="." unique_id=666307058 instance=ExtResource("2_hyo0h")]
visible = false
top_level = true
layout_mode = 1
[node name="Questions" parent="." unique_id=2060279649 instance=ExtResource("3_lhsfi")]
visible = false
top_level = true
layout_mode = 1
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="." unique_id=2026035561]
oversampling_override = 1.0
size = Vector2i(1008, 100)
ok_button_text = "Составить отчёт"
dialog_text = "Вы уверены, что хотите закончить лабораторную работу и составить отчёт? Отчёт будет отправлен на ваш рабочий стол"
cancel_button_text = "Отменить"
[connection signal="tab_clicked" from="." to="." method="_on_tab_clicked"]