mod control panel

This commit is contained in:
2024-12-18 21:47:34 +03:00
parent 3865ac1128
commit ca4b5abbbb
3 changed files with 846 additions and 38 deletions

786
PRD3E56.tmp Normal file
View File

@@ -0,0 +1,786 @@
[gd_scene load_steps=47 format=3 uid="uid://cvor2jm4xk3ha"]
[ext_resource type="Script" path="res://scripts/PRD.gd" id="1_v273n"]
[ext_resource type="Texture2D" uid="uid://cdxdluvyb5uei" path="res://table/on.png" id="2_dv7xx"]
[ext_resource type="Script" path="res://table/table.gd" id="2_vmbyo"]
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://Shaders/shader_edu.tres" id="3_3syd3"]
[ext_resource type="Texture2D" uid="uid://cfktmk2rowmul" path="res://table/off.png" id="3_qvuyu"]
[ext_resource type="Shader" path="res://Shaders/ray.gdshader" id="4_uy5o2"]
[ext_resource type="Texture2D" uid="uid://62v0xejejuwj" path="res://Web.png" id="5_i3nvb"]
[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="9_0r2qk"]
[ext_resource type="Script" path="res://ems_g.gd" id="9_g1wia"]
[ext_resource type="Shader" path="res://load.gdshader" id="10_lf1xh"]
[ext_resource type="PackedScene" uid="uid://bdb0bhfu7366l" path="res://kasseta-fs-kd.tscn" id="10_tdh2s"]
[ext_resource type="PackedScene" uid="uid://bnlkbbn7b4a3k" path="res://table/элемент-эмс.tscn" id="11_d60jk"]
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://table/элемент-в.tscn" id="11_fg7ul"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eib3t"]
bg_color = Color(0.356863, 0.278431, 0.356863, 1)
border_width_bottom = 6
border_color = Color(0.228592, 0.173062, 0.22863, 1)
border_blend = true
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o0too"]
bg_color = Color(0.223529, 0.168627, 0.223529, 1)
border_width_bottom = 6
border_color = Color(0.339047, 0.26316, 0.339004, 1)
border_blend = true
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gooip"]
bg_color = Color(0.223529, 0.168627, 0.223529, 0.490196)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lqhgx"]
bg_color = Color(0, 0, 0, 0.490196)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_148rs"]
bg_color = Color(0, 0, 0, 0.490196)
border_width_bottom = 4
border_color = Color(0.223529, 0.168627, 0.223529, 1)
border_blend = true
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ldbvf"]
bg_color = Color(0.223529, 0.168627, 0.223529, 0.490196)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_h8aei"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_d322q"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_8j02b"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ls6vm"]
[sub_resource type="Theme" id="Theme_k5ur4"]
Button/styles/focus = SubResource("StyleBoxFlat_eib3t")
Button/styles/hover = SubResource("StyleBoxFlat_o0too")
Button/styles/normal = SubResource("StyleBoxFlat_o0too")
Button/styles/pressed = SubResource("StyleBoxFlat_eib3t")
CheckButton/icons/checked = ExtResource("2_dv7xx")
CheckButton/icons/unchecked = ExtResource("3_qvuyu")
OptionButton/font_sizes/font_size = 17
OptionButton/styles/focus = SubResource("StyleBoxFlat_gooip")
OptionButton/styles/hover = SubResource("StyleBoxFlat_lqhgx")
OptionButton/styles/normal = SubResource("StyleBoxFlat_148rs")
OptionButton/styles/pressed = SubResource("StyleBoxFlat_ldbvf")
TabContainer/styles/panel = SubResource("StyleBoxTexture_h8aei")
TabContainer/styles/tab_focus = SubResource("StyleBoxTexture_d322q")
TabContainer/styles/tab_selected = SubResource("StyleBoxTexture_8j02b")
TabContainer/styles/tabbar_background = SubResource("StyleBoxTexture_ls6vm")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pxarn"]
bg_color = Color(0.356863, 0.278431, 0.356863, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p247y"]
bg_color = Color(0.356863, 0.278431, 0.356863, 1)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rh6pm"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_x11tp"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_mn8w2"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_21lc8"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_k08q3"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_dklg6"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_17le6"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_7u7p7"]
[sub_resource type="Gradient" id="Gradient_jlp41"]
colors = PackedColorArray(0, 0.647059, 0, 1, 0, 0.266667, 0, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_u3yy8"]
gradient = SubResource("Gradient_jlp41")
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1.145, 0)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_otisn"]
texture = SubResource("GradientTexture2D_u3yy8")
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_723du"]
size = Vector2(1600, 1200)
[sub_resource type="GDScript" id="GDScript_0sobq"]
script/source = "extends Sprite2D
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_o7txs"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dgiai"]
shader = ExtResource("4_uy5o2")
shader_parameter/color_signal = Color(0.690196, 0.776471, 0, 1)
shader_parameter/turn = 0.785
[sub_resource type="Gradient" id="Gradient_ki0n7"]
[sub_resource type="GradientTexture2D" id="GradientTexture2D_0pk2o"]
gradient = SubResource("Gradient_ki0n7")
fill_from = Vector2(0.474359, 0.5)
metadata/_snap_enabled = true
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_tn8m6"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ooo4i"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_slcfo"]
shader = ExtResource("10_lf1xh")
shader_parameter/frequency = 5.0
shader_parameter/amplitude = 600.0
shader_parameter/speed = 5.0
shader_parameter/direction = -1.0
shader_parameter/color1 = Color(0, 0, 0, 1)
shader_parameter/color2 = Color(0.235, 0.18, 0.235, 1)
shader_parameter/color3 = Color(0.235, 0.18, 0.235, 0.5)
shader_parameter/color4 = Color(0, 0, 0, 0)
shader_parameter/opacity = 0.218
shader_parameter/turn = 0.785
[node name="Node2D" type="Node2D"]
script = ExtResource("1_v273n")
[node name="Background" type="ColorRect" parent="."]
offset_right = 1941.0
offset_bottom = 988.0
theme = SubResource("Theme_k5ur4")
color = Color(0.356863, 0.278431, 0.356863, 1)
metadata/_edit_lock_ = true
[node name="side_panel" type="ColorRect" parent="Background"]
layout_mode = 0
offset_right = 216.0
offset_bottom = 988.0
color = Color(0.586231, 0.481877, 0.585869, 1)
[node name="select_prd" type="Button" parent="Background/side_panel"]
layout_mode = 0
offset_top = 120.0
offset_right = 216.0
offset_bottom = 156.0
focus_mode = 0
mouse_default_cursor_shape = 2
theme_override_font_sizes/font_size = 14
theme_override_styles/pressed = SubResource("StyleBoxFlat_pxarn")
toggle_mode = true
button_pressed = true
text = "ПРД"
[node name="select_control" type="Button" parent="Background/side_panel"]
layout_mode = 0
offset_top = 160.0
offset_right = 216.0
offset_bottom = 196.0
focus_mode = 0
mouse_default_cursor_shape = 2
theme_override_font_sizes/font_size = 14
theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y")
toggle_mode = true
text = "КОНТРОЛЬ"
[node name="select_ems_g" type="Button" parent="Background/side_panel"]
layout_mode = 0
offset_top = 200.0
offset_right = 216.0
offset_bottom = 236.0
focus_mode = 0
mouse_default_cursor_shape = 2
theme_override_font_sizes/font_size = 14
theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y")
toggle_mode = true
text = "ЭМС Г"
[node name="Litera_3_5_7" type="ColorRect" parent="Background"]
visible = false
layout_mode = 0
offset_top = 48.0
offset_right = 1941.0
offset_bottom = 352.0
color = Color(0.669446, 0.567301, 0.66881, 1)
[node name="Litera_1" type="ColorRect" parent="Background"]
visible = false
layout_mode = 0
offset_top = 359.0
offset_right = 2182.0
offset_bottom = 638.0
color = Color(0.669446, 0.567301, 0.66881, 1)
[node name="ISA" type="Label" parent="."]
offset_left = 225.0
offset_top = 11.0
offset_right = 1853.0
offset_bottom = 48.0
autowrap_mode = 3
[node name="read_isa" type="Button" parent="."]
offset_left = 85.0
offset_top = 7.0
offset_right = 210.0
offset_bottom = 38.0
text = "Прочитать ISA"
[node name="TabContainer" type="TabContainer" parent="."]
offset_left = 216.0
offset_top = 39.0
offset_right = 2420.0
offset_bottom = 917.0
theme = SubResource("Theme_k5ur4")
theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157)
theme_override_colors/font_selected_color = Color(0, 0, 0, 0)
theme_override_styles/tab_focus = SubResource("StyleBoxTexture_rh6pm")
theme_override_styles/tab_disabled = SubResource("StyleBoxTexture_x11tp")
theme_override_styles/tabbar_background = SubResource("StyleBoxTexture_mn8w2")
theme_override_styles/panel = SubResource("StyleBoxTexture_21lc8")
theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3")
theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6")
theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6")
tab_alignment = 2
current_tab = 0
tab_focus_mode = 0
[node name="PRD" type="Panel" parent="TabContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7")
metadata/_tab_index = 0
metadata/_edit_lock_ = true
[node name="scroll1" type="ScrollContainer" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 969.0
offset_top = 27.0
offset_right = 1332.0
offset_bottom = 308.0
[node name="table1" type="GridContainer" parent="TabContainer/PRD/scroll1"]
layout_mode = 2
script = ExtResource("2_vmbyo")
metadata/_edit_lock_ = true
[node name="scroll2" type="ScrollContainer" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 969.0
offset_top = 331.0
offset_right = 1332.0
offset_bottom = 619.0
[node name="table2" type="GridContainer" parent="TabContainer/PRD/scroll2"]
layout_mode = 2
script = ExtResource("2_vmbyo")
metadata/_edit_lock_ = true
[node name="LABEL" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 17.0
offset_right = 764.0
offset_bottom = 40.0
text = "ЛИТЕРА 2! ПРД-Н!"
[node name="Zapret" type="Button" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 45.0
offset_right = 600.0
offset_bottom = 79.0
focus_mode = 0
mouse_default_cursor_shape = 2
theme_override_styles/pressed = SubResource("StyleBoxTexture_otisn")
toggle_mode = true
text = " Запрет СИ2"
metadata/litera = 48
[node name="LABEL2" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 329.0
offset_right = 764.0
offset_bottom = 352.0
text = "ЛИТЕРА 3! ПРД-Н!"
[node name="Zapret2" type="Button" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 357.0
offset_right = 600.0
offset_bottom = 391.0
focus_mode = 0
mouse_default_cursor_shape = 2
theme_override_styles/pressed = SubResource("StyleBoxTexture_otisn")
toggle_mode = true
text = " Запрет СИ3"
metadata/litera = 49
[node name="Label_luch" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 100.0
offset_right = 764.0
offset_bottom = 123.0
text = "Номер и направление луча"
[node name="LUCH" type="OptionButton" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 132.0
offset_right = 600.0
offset_bottom = 163.0
item_count = 2
popup/item_0/text = "Что-то"
popup/item_1/text = "Что-то"
popup/item_1/id = 1
[node name="Modul" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 402.0
offset_right = 626.0
offset_bottom = 425.0
text = "Модуляция"
[node name="DKM2" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 183.0
offset_right = 624.0
offset_bottom = 206.0
text = "ДКМ ДОУ 2"
[node name="DKM3" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 431.0
offset_right = 624.0
offset_bottom = 454.0
text = "ДКМ ДОУ 3"
[node name="FGOZ2" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 206.0
offset_right = 655.0
offset_bottom = 229.0
text = "ФГОЗ 2"
[node name="FGOZ3" type="Label" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 482.0
offset_top = 454.0
offset_right = 655.0
offset_bottom = 477.0
text = "ФГОЗ 3"
[node name="PSK" type="Sprite2D" parent="TabContainer/PRD"]
material = ExtResource("3_3syd3")
position = Vector2(1276.25, 29)
scale = Vector2(0.247968, 0.234167)
texture = SubResource("PlaceholderTexture2D_723du")
offset = Vector2(800, 600)
script = SubResource("GDScript_0sobq")
[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/PSK"]
modulate = Color(0, 0, 0, 1)
self_modulate = Color(0, 0, 0, 1)
show_behind_parent = true
material = SubResource("ShaderMaterial_o7txs")
offset_left = 554.954
offset_top = -30.0
offset_right = 1290.95
offset_bottom = 1134.0
texture = ExtResource("5_i3nvb")
expand_mode = 1
metadata/_edit_lock_ = true
[node name="ray" type="Sprite2D" parent="TabContainer/PRD/PSK"]
material = SubResource("ShaderMaterial_dgiai")
position = Vector2(549.221, 560.705)
scale = Vector2(21.8765, 21.6782)
texture = SubResource("GradientTexture2D_0pk2o")
metadata/_edit_lock_ = true
[node name="PSK2" type="Sprite2D" parent="TabContainer/PRD"]
material = ExtResource("3_3syd3")
position = Vector2(1276, 326)
scale = Vector2(0.247968, 0.234167)
texture = SubResource("PlaceholderTexture2D_723du")
offset = Vector2(800, 600)
script = SubResource("GDScript_0sobq")
[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/PSK2"]
modulate = Color(0, 0, 0, 1)
self_modulate = Color(0, 0, 0, 1)
show_behind_parent = true
material = SubResource("ShaderMaterial_o7txs")
offset_left = 554.954
offset_top = -30.0
offset_right = 1290.95
offset_bottom = 1134.0
texture = ExtResource("5_i3nvb")
expand_mode = 1
metadata/_edit_lock_ = true
[node name="ray" type="Sprite2D" parent="TabContainer/PRD/PSK2"]
material = SubResource("ShaderMaterial_dgiai")
position = Vector2(549.221, 560.705)
scale = Vector2(21.8765, 21.6782)
texture = SubResource("GradientTexture2D_0pk2o")
metadata/_edit_lock_ = true
[node name="select_dev" type="ScrollContainer" parent="TabContainer/PRD"]
layout_mode = 0
offset_left = 12.0
offset_top = 64.0
offset_right = 375.0
offset_bottom = 96.0
[node name="select_dev" type="GridContainer" parent="TabContainer/PRD/select_dev"]
layout_mode = 2
script = ExtResource("2_vmbyo")
metadata/_edit_lock_ = true
[node name="ControlPanel" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6")
metadata/_tab_index = 1
metadata/_edit_lock_ = true
[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 412.0
offset_top = -43.0
offset_right = 1032.0
offset_bottom = -12.0
theme_override_font_sizes/font_size = 22
text = "Контроль исправности прибора ПРД-Н"
horizontal_alignment = 1
vertical_alignment = 1
[node name="sockets" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 567.0
offset_top = -2.0
offset_right = 876.0
offset_bottom = 188.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="ref_A26" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")]
offset_left = 5.0
offset_top = 34.0
offset_right = 55.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "ЯУ-07"
metadata/_edit_lock_ = true
[node name="ref_A23" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")]
offset_left = 53.0
offset_top = 34.0
offset_right = 103.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "ЭМС-Г"
metadata/_edit_lock_ = true
[node name="ref_A24" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")]
offset_left = 104.0
offset_top = 34.0
offset_right = 154.0
offset_bottom = 184.0
textures = Array[Texture]([])
fname = "УГ"
metadata/_edit_lock_ = true
[node name="ref_A25" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")]
offset_left = 154.0
offset_top = 33.0
offset_right = 204.0
offset_bottom = 183.0
textures = Array[Texture]([])
fname = "УКП-1"
metadata/_edit_lock_ = true
[node name="ref_A27" parent="TabContainer/ControlPanel/sockets" instance=ExtResource("11_fg7ul")]
offset_left = 205.0
offset_top = 33.0
offset_right = 255.0
offset_bottom = 183.0
textures = Array[Texture]([])
fname = "УКП-2"
metadata/_edit_lock_ = true
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/sockets"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
offset_top = 8.0
offset_right = 291.0
offset_bottom = 33.0
text = "Ячейки"
horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_lock_ = true
[node name="kasseta_fs_kd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")]
layout_mode = 0
offset_left = 567.0
offset_top = 207.0
offset_right = 877.0
offset_bottom = 434.0
script = null
[node name="kasseta_p_1" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 567.0
offset_top = 456.0
offset_right = 987.0
offset_bottom = 672.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/kasseta_p_1"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
offset_top = 8.0
offset_right = 409.0
offset_bottom = 33.0
text = "Кассета П-1"
horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_lock_ = true
[node name="ref_A23" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 9.0
offset_top = 34.0
offset_right = 59.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП МАА 1"
metadata/_edit_lock_ = true
[node name="ref_A24" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 59.0
offset_top = 34.0
offset_right = 109.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП МАА 2"
metadata/_edit_lock_ = true
[node name="ref_A25" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 109.0
offset_top = 34.0
offset_right = 159.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП9-50 1"
metadata/_edit_lock_ = true
[node name="ref_A26" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 159.0
offset_top = 34.0
offset_right = 209.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП9-50 2"
metadata/_edit_lock_ = true
[node name="ref_A27" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 209.0
offset_top = 34.0
offset_right = 259.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП12-50 1"
metadata/_edit_lock_ = true
[node name="ref_A28" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 259.0
offset_top = 34.0
offset_right = 309.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП9-50 3"
metadata/_edit_lock_ = true
[node name="ref_A29" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 309.0
offset_top = 34.0
offset_right = 359.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП12-50 2"
metadata/_edit_lock_ = true
[node name="ref_A30" parent="TabContainer/ControlPanel/kasseta_p_1" instance=ExtResource("11_fg7ul")]
offset_left = 359.0
offset_top = 34.0
offset_right = 409.0
offset_bottom = 208.0
textures = Array[Texture]([])
self_size = Vector2i(50, 174)
fname = "ИП5-25"
rname = "A30"
metadata/_edit_lock_ = true
[node name="ref_ZZ3" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 237.0
offset_top = 538.0
offset_right = 547.0
offset_bottom = 675.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="label" type="Label" parent="TabContainer/ControlPanel/ref_ZZ3"]
self_modulate = Color(0.996078, 1, 1, 0.627451)
layout_mode = 0
offset_left = 10.0
offset_top = 8.0
offset_right = 302.0
offset_bottom = 120.0
text = "Панель
предохранителей"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 239.0
offset_top = 207.0
offset_right = 548.0
offset_bottom = 434.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/Signal_EMS_G"]
self_modulate = Color(1, 1, 1, 0.62)
layout_mode = 0
offset_left = 7.0
offset_top = 8.0
offset_right = 291.0
offset_bottom = 33.0
text = "Сигналы от ЭМС-Г"
horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_lock_ = true
[node name="ref_A22" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 5.0
offset_top = 38.0
offset_right = 55.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
fname = "СЗИ2 от УФ"
metadata/_edit_lock_ = true
[node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 55.0
offset_top = 38.0
offset_right = 105.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
fname = "СИ2 от ФС"
metadata/_edit_lock_ = true
[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 105.0
offset_top = 38.0
offset_right = 155.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
fname = "СИ2 в УФ"
metadata/_edit_lock_ = true
[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 155.0
offset_top = 38.0
offset_right = 205.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
fname = "Модуляция"
metadata/_edit_lock_ = true
[node name="ref_A30" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")]
offset_left = 205.0
offset_top = 38.0
offset_right = 255.0
offset_bottom = 216.0
self_size = Vector2i(50, 178)
fname = "ФГОЗ"
metadata/_edit_lock_ = true
[node name="EMS_G" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_ooo4i")
script = ExtResource("9_g1wia")
metadata/_tab_index = 2
metadata/_edit_lock_ = true
[node name="table1" type="GridContainer" parent="TabContainer/EMS_G"]
layout_mode = 2
offset_left = 27.0
offset_top = 148.0
offset_right = 27.0
offset_bottom = 148.0
script = ExtResource("2_vmbyo")
metadata/_edit_lock_ = true
[node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"]
layout_mode = 0
offset_left = 27.0
offset_top = 148.0
offset_right = 1596.0
offset_bottom = 717.0
color = Color(0, 0, 0, 0.596078)
[node name="load" type="Sprite2D" parent="TabContainer/EMS_G/load_boadr"]
material = SubResource("ShaderMaterial_slcfo")
position = Vector2(786, 284.5)
scale = Vector2(24.4688, 8.89063)
texture = SubResource("GradientTexture2D_0pk2o")
metadata/_edit_lock_ = true
[node name="Load_text" type="Label" parent="TabContainer/EMS_G/load_boadr"]
layout_mode = 0
offset_left = 693.0
offset_top = 277.0
offset_right = 849.0
offset_bottom = 316.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_shadow_color = Color(0.427493, 0.427493, 0.427493, 1)
theme_override_font_sizes/font_size = 28
text = "Загрузка ..."
[connection signal="pressed" from="Background/side_panel/select_prd" to="." method="_on_prd_select"]
[connection signal="pressed" from="Background/side_panel/select_control" to="." method="_on_control_button"]
[connection signal="pressed" from="Background/side_panel/select_ems_g" to="." method="_on_emsg_select"]
[connection signal="pressed" from="read_isa" to="." method="_on_read_isa_pressed"]

View File

@@ -242,10 +242,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3")
theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6")
theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6")
tab_alignment = 2
current_tab = 0
current_tab = 1
tab_focus_mode = 0
[node name="PRD" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7")
metadata/_tab_index = 0
@@ -445,7 +446,6 @@ script = ExtResource("2_vmbyo")
metadata/_edit_lock_ = true
[node name="ControlPanel" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6")
metadata/_tab_index = 1
@@ -453,10 +453,10 @@ metadata/_edit_lock_ = true
[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 412.0
offset_top = -43.0
offset_right = 1032.0
offset_bottom = -12.0
offset_left = 636.0
offset_top = 21.0
offset_right = 1256.0
offset_bottom = 52.0
theme_override_font_sizes/font_size = 22
text = "Контроль исправности прибора ПРД-Н"
horizontal_alignment = 1
@@ -464,10 +464,10 @@ vertical_alignment = 1
[node name="sockets" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 567.0
offset_top = -2.0
offset_right = 876.0
offset_bottom = 188.0
offset_left = 791.0
offset_top = 62.0
offset_right = 1100.0
offset_bottom = 252.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
@@ -533,18 +533,18 @@ metadata/_edit_lock_ = true
[node name="kasseta_fs_kd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")]
layout_mode = 0
offset_left = 567.0
offset_top = 207.0
offset_right = 877.0
offset_bottom = 434.0
offset_left = 791.0
offset_top = 271.0
offset_right = 1101.0
offset_bottom = 498.0
script = null
[node name="kasseta_p_1" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 567.0
offset_top = 456.0
offset_right = 987.0
offset_bottom = 672.0
offset_left = 791.0
offset_top = 520.0
offset_right = 1211.0
offset_bottom = 736.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
@@ -646,10 +646,10 @@ metadata/_edit_lock_ = true
[node name="ref_ZZ3" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 237.0
offset_top = 538.0
offset_right = 547.0
offset_bottom = 675.0
offset_left = 461.0
offset_top = 602.0
offset_right = 771.0
offset_bottom = 739.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16
@@ -670,10 +670,10 @@ vertical_alignment = 1
[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"]
layout_mode = 0
offset_left = 239.0
offset_top = 207.0
offset_right = 548.0
offset_bottom = 434.0
offset_left = 463.0
offset_top = 271.0
offset_right = 772.0
offset_bottom = 498.0
texture = ExtResource("9_0r2qk")
patch_margin_left = 16
patch_margin_top = 16

View File

@@ -95,24 +95,46 @@ func _on_data_received(data_from_yau_07):
var in_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.IN_IMPULS_PRD)
var out_blank: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_BLANK_PRD)
var out_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_IMPULS_PRD)
var parent_node2 = get_parent().get_parent()
for i in 16:
var socket_status = node_select1.get_node2(1, i+shift+1).get_child(0, false)
if (in_blank & (1 << i) != 0):
for i_in in 16:
var socket_status = node_select1.get_node2(1, i_in+shift+1).get_child(0, false)
if (in_blank & (1 << i_in) != 0):
if i_in == 1:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(1).get_child(3), Constants.Frame.CONSTANT)
if i_in == 9:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(2).get_child(3), Constants.Frame.CONSTANT)
set_frame(socket_status, Constants.Frame.CONSTANT)
elif (in_imp & (1 << i) != 0):
elif (in_imp & (1 << i_in) != 0):
set_frame(socket_status, Constants.Frame.VARIABLE)
else:
set_frame(socket_status, Constants.Frame.WORK)
if i_in == 1:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(1).get_child(3), Constants.Frame.WORK)
if i_in == 9:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(2).get_child(3), Constants.Frame.WORK)
set_frame(socket_status, Constants.Frame.WORK)
#
for i in 16:
var socket_status = node_select1.get_node2(i+shift, 2).get_child(0, false)
if (out_blank & (1 << i) != 0):
for i_out in 16:
var socket_status = node_select1.get_node2(i_out+shift, 2).get_child(0, false)
if (out_blank & (1 << i_out) != 0):
if i_out == 1:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(3).get_child(3), Constants.Frame.CONSTANT)
if i_out == 4:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(4).get_child(3), Constants.Frame.CONSTANT)
if i_out == 9:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(5).get_child(3), Constants.Frame.CONSTANT)
set_frame(socket_status, Constants.Frame.CONSTANT)
elif (out_imp & (1 << i) != 0):
elif (out_imp & (1 << i_out) != 0):
set_frame(socket_status, Constants.Frame.VARIABLE)
else:
set_frame(socket_status, Constants.Frame.WORK)
if i_out == 1:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(3).get_child(3), Constants.Frame.WORK)
if i_out == 4:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(4).get_child(3), Constants.Frame.WORK)
if i_out == 9:
set_frame(parent_node2.get_child(3, false).get_child(1).get_child(5).get_child(5).get_child(3), Constants.Frame.WORK)
set_frame(socket_status, Constants.Frame.WORK)
func _process(_delta: float) -> void:
@@ -142,7 +164,7 @@ func create_link_button(node, count_rows_sart: int, count_rows_end: int, coln_st
for i_col in range (coln_start, coln_end):
var chk_node = node.get_node2(i_col, i_row)
var chk_btn = chk_node.get_child(1, false)
chk_btn.connect('toggled', Callable(self, 'on_btn_connect').bind(chk_node, chk_btn))
chk_btn.connect('toggled', Callable(self, '_on_btn_connect').bind(chk_btn))
chk_btn.set_meta('device', META_EMS_G[count_register])
count_register += 1
@@ -161,7 +183,7 @@ func on_mode_link(mode, list):
Network.send_array.append(['wr', ports_wr])
func on_btn_connect(toggled_on: bool, chk_node: Node, chk_btn: Node):
func _on_btn_connect(toggled_on: bool, chk_btn: Node):
## Формирование команды для выбора устройства
var meta = chk_btn.get_meta('device')
var address_port_wr = Constants.EMS_G_BASE_ADDR+2