[PATCH] Доработка. Добавлено отображение информации от Трассы на экране ЭМС ТГ.

This commit is contained in:
MaD_CaT
2025-11-08 11:07:54 +03:00
committed by sasha80
parent 91b79266df
commit 16ca216bdd
7 changed files with 65 additions and 12 deletions

View File

@@ -47,11 +47,10 @@ theme_override_styles/tab_focus = SubResource("StyleBoxEmpty_41d34")
theme_override_styles/tab_disabled = SubResource("StyleBoxEmpty_cw2ss")
theme_override_styles/tabbar_background = SubResource("StyleBoxEmpty_nmdfd")
theme_override_styles/panel = SubResource("StyleBoxEmpty_vap7n")
current_tab = 3
current_tab = 0
script = ExtResource("1_fg0vd")
[node name="Работа" parent="tab_switch" instance=ExtResource("2_u7p16")]
visible = false
layout_mode = 2
metadata/_tab_index = 0
@@ -66,6 +65,7 @@ layout_mode = 2
metadata/_tab_index = 2
[node name="ЭМС" parent="tab_switch" instance=ExtResource("5_u71bh")]
visible = false
layout_mode = 2
metadata/_tab_index = 3
@@ -95,15 +95,13 @@ script = ExtResource("8_tidwt")
metadata/_edit_lock_ = true
[node name="remote_control" type="Label" parent="."]
visible = false
layout_mode = 2
offset_left = 1358.0
offset_right = 1501.0
offset_left = 1244.0
offset_right = 1401.0
offset_bottom = 27.0
tooltip_text = "Комплекс находится под внешним управлением"
mouse_filter = 0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 14
theme_override_styles/normal = SubResource("StyleBoxFlat_o1r22")
text = "Внешнее управление"
horizontal_alignment = 1

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=34 format=3 uid="uid://musb21x2u0xs"]
[gd_scene load_steps=35 format=3 uid="uid://musb21x2u0xs"]
[ext_resource type="Texture2D" uid="uid://hkcvl2waf63s" path="res://scenes/эмс2/вид сверху.png" id="1_b7vcf"]
[ext_resource type="Script" uid="uid://bvlqgv7aapebl" path="res://scenes/эмс2/эмсг.gd" id="1_l3ueu"]
[ext_resource type="Texture2D" uid="uid://0w6q4vfst0ry" path="res://scenes/эмс2/OP-63.png" id="3_8gk36"]
[ext_resource type="Texture2D" uid="uid://coxhivvc6uibs" path="res://scenes/эмс2/Состояние РЭС 40.png" id="4_b3mus"]
[ext_resource type="Texture2D" uid="uid://073el51yholj" path="res://scenes/эмс2/454.png" id="4_nqi0i"]
@@ -39,6 +40,7 @@ load_path = "res://.godot/imported/Окно частот0.png-6b01791c971bddb013
load_path = "res://.godot/imported/Скруглённый квадрат серый.png-4655829309cca3b1dec2c9ae01376d54.ctex"
[node name="Panel" type="Panel"]
script = ExtResource("1_l3ueu")
[node name="Sprite2D" type="Sprite2D" parent="."]
modulate = Color(1, 0.596078, 0.4, 1)
@@ -106,6 +108,15 @@ position = Vector2(275.641, 38.4615)
scale = Vector2(3.20513, 3.20513)
texture = ExtResource("6_m57px")
[node name="lbl_trassa" type="Label" parent="454"]
layout_mode = 0
offset_left = -42.0
offset_top = -135.0
offset_right = 221.0
offset_bottom = -36.0
theme_override_font_sizes/font_size = 100
text = "Трасса"
[node name="Го" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 488.0

View File

@@ -0,0 +1,37 @@
extends Panel
func _ready() -> void:
var unit_trassa = network.get_unit_instance('уарэп-трасса')
unit_trassa.connect('line_changed', Callable(self, 'on_trassa_line_changed'))
signaller.connect('sector_klaster', Callable(self, 'on_sector_klaster').bind(unit_trassa))
func on_trassa_line_changed(unit_trassa):
if unit_trassa.online:
$"454/СостояниеРэс3".self_modulate = Color.WEB_GREEN
$"СкруглённыйПрямоугольникБелый/Label3".text = 'Трасса'
$"СкруглённыйПрямоугольникБелый/Label4".text = 'Трасса'
$"СкруглённыйПрямоугольникБелый/Label5".text = 'Активный'
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.daa)
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.dap)
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
$"СкруглённыйПрямоугольникБелый/Label9".text = str(unit_trassa.lfb)
$"СкруглённыйПрямоугольникБелый/Label10".text = str(unit_trassa.lfb)
else:
$"454/СостояниеРэс3".self_modulate = Color.WHITE
$"СкруглённыйПрямоугольникБелый/Label3".text = '-'
$"СкруглённыйПрямоугольникБелый/Label4".text = '-'
$"СкруглённыйПрямоугольникБелый/Label5".text = '-'
$"СкруглённыйПрямоугольникБелый/Label6".text = '-'
$"СкруглённыйПрямоугольникБелый/Label7".text = '-'
$"СкруглённыйПрямоугольникБелый/Label8".text = '-'
$"СкруглённыйПрямоугольникБелый/Label9".text = '-'
$"СкруглённыйПрямоугольникБелый/Label10".text = '-'
func on_sector_klaster(data, unit_trassa):
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.dap)
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.daa)
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
$"СкруглённыйПрямоугольникБелый/Label9".text = str(unit_trassa.lfb)
$"СкруглённыйПрямоугольникБелый/Label10".text = str(unit_trassa.hfb)

View File

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