Доработка. Добавлено отображение внешнего управления.

This commit is contained in:
MaD_CaT
2025-05-23 15:31:45 +03:00
parent b7249306e6
commit 92642a1901
3 changed files with 23 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ const TAB_TOSIGNAL_NAME = {
func _enter_tree() -> void:
network.logger_page = $Журнал
signaller.connect('ems2_hide_pressed', on_ems2_hide_pressed)
ProjectSettings.connect('settings_changed', on_setting_changed)
func on_ems2_hide_pressed(state):
@@ -21,3 +22,8 @@ func on_ems2_hide_pressed(state):
func _on_tab_changed(tab) -> void:
if TAB_TOSIGNAL_NAME.has(tab):
signaller.emit_signal(TAB_TOSIGNAL_NAME[tab])
func on_setting_changed():
var ext_cu = ProjectSettings.get_setting('application/config/external_cu', false)
get_parent().get_node('remote_control').visible = ext_cu

View File

@@ -82,4 +82,20 @@ text = "Исправно"
horizontal_alignment = 1
vertical_alignment = 1
[node name="remote_control" type="Label" parent="."]
visible = false
layout_mode = 2
offset_left = 1358.0
offset_right = 1501.0
offset_bottom = 27.0
tooltip_text = "Готовность аппаратуры к работе"
mouse_filter = 0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("7_i7l8n")
theme_override_font_sizes/font_size = 14
theme_override_styles/normal = SubResource("StyleBoxFlat_o1r22")
text = "Внешнее управление"
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="tab_changed" from="tab_switch" to="tab_switch" method="_on_tab_changed"]