Работа в процессе. Журнал работы
This commit is contained in:
20
scenes/журнал.gd
Normal file
20
scenes/журнал.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Control
|
||||
|
||||
|
||||
func _on_clear_button_down() -> void:
|
||||
$content.clear()
|
||||
Log.info('содержание журнала очищено оператором')
|
||||
|
||||
|
||||
func _on_btn_save_button_down() -> void:
|
||||
$content.hide()
|
||||
$btn_clear.hide()
|
||||
$btn_save.hide()
|
||||
$dlg_file.show()
|
||||
|
||||
|
||||
func _on_dlg_file_confirmed() -> void:
|
||||
$content.show()
|
||||
$btn_clear.show()
|
||||
$btn_save.show()
|
||||
$dlg_file.hide()
|
||||
55
scenes/журнал.tscn
Normal file
55
scenes/журнал.tscn
Normal file
@@ -0,0 +1,55 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://trt0q8th3bn2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_3f1mv"]
|
||||
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="1_t5g4h"]
|
||||
|
||||
[node name="журнал" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_3f1mv")
|
||||
|
||||
[node name="content" type="RichTextLabel" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 16.0
|
||||
offset_top = 57.0
|
||||
offset_right = 1584.0
|
||||
offset_bottom = 999.0
|
||||
focus_mode = 2
|
||||
threaded = true
|
||||
selection_enabled = true
|
||||
deselect_on_focus_loss_enabled = false
|
||||
script = ExtResource("1_t5g4h")
|
||||
|
||||
[node name="btn_save" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1344.0
|
||||
offset_top = 1044.0
|
||||
offset_right = 1440.0
|
||||
offset_bottom = 1080.0
|
||||
text = "Сохранить"
|
||||
|
||||
[node name="btn_clear" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1200.0
|
||||
offset_top = 1044.0
|
||||
offset_right = 1296.0
|
||||
offset_bottom = 1080.0
|
||||
text = "Очистить"
|
||||
|
||||
[node name="dlg_file" type="FileDialog" parent="."]
|
||||
gui_embed_subwindows = true
|
||||
title = "Сохранить журнал работы в файл"
|
||||
initial_position = 2
|
||||
size = Vector2i(900, 900)
|
||||
borderless = true
|
||||
ok_button_text = "Да"
|
||||
cancel_button_text = "Отмена"
|
||||
|
||||
[connection signal="button_down" from="btn_save" to="." method="_on_btn_save_button_down"]
|
||||
[connection signal="button_down" from="btn_clear" to="." method="_on_clear_button_down" flags=3]
|
||||
[connection signal="canceled" from="dlg_file" to="." method="_on_dlg_file_confirmed"]
|
||||
[connection signal="confirmed" from="dlg_file" to="." method="_on_dlg_file_confirmed"]
|
||||
Reference in New Issue
Block a user