Доработка. Добавлен обработчик ввода текста в Entry.

This commit is contained in:
MaD_CaT
2023-08-15 15:43:09 +03:00
parent 6abec8c07c
commit c0e44f0430
8 changed files with 112 additions and 133 deletions

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://b8txs4xi722wt"]
[ext_resource type="Script" path="res://scenes/cell-front.gd" id="1_dr0u6"]
[ext_resource type="Texture2D" uid="uid://c6yuv0b51aauw" path="res://data/фронт-задний-1.png" id="2_x6ot3"]
[ext_resource type="Script" path="res://scenes/cell-front.gd" id="1_ckjh0"]
[ext_resource type="Texture2D" uid="uid://c6yuv0b51aauw" path="res://data/фронт-задний-1.png" id="2_5x6hc"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2thpi"]
bg_color = Color(0.8, 0.533333, 0.27451, 1)
@@ -12,7 +12,7 @@ layout_mode = 3
anchors_preset = 0
offset_right = 71.0
offset_bottom = 21.0
script = ExtResource("1_dr0u6")
script = ExtResource("1_ckjh0")
[node name="label" type="Label" parent="."]
clip_contents = true
@@ -26,4 +26,4 @@ vertical_alignment = 1
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(58, 11)
texture = ExtResource("2_x6ot3")
texture = ExtResource("2_5x6hc")

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://bccr42bckei41"]
[ext_resource type="Script" path="res://scenes/cell-front.gd" id="1_jh3nx"]
[ext_resource type="Texture2D" uid="uid://ysctr84e77dc" path="res://data/фронт-передний-1.png" id="2_k4ceq"]
[ext_resource type="Script" path="res://scenes/cell-front.gd" id="1_fs0rx"]
[ext_resource type="Texture2D" uid="uid://ysctr84e77dc" path="res://data/фронт-передний-1.png" id="2_j6r08"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2thpi"]
bg_color = Color(0.8, 0.533333, 0.27451, 1)
@@ -12,7 +12,7 @@ layout_mode = 3
anchors_preset = 0
offset_right = 71.0
offset_bottom = 21.0
script = ExtResource("1_jh3nx")
script = ExtResource("1_fs0rx")
[node name="label" type="Label" parent="."]
clip_contents = true
@@ -26,4 +26,4 @@ vertical_alignment = 1
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(16, 11)
texture = ExtResource("2_k4ceq")
texture = ExtResource("2_j6r08")

View File

@@ -1,27 +1,27 @@
[gd_scene load_steps=6 format=3 uid="uid://3slb0i3pvowc"]
[ext_resource type="Script" path="res://scenes/tab_switch.gd" id="1_dsbbu"]
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_kenm6"]
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="3_2fkox"]
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="4_2se5x"]
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/ЭМС.tscn" id="5_2rigj"]
[ext_resource type="Script" path="res://scenes/tab_switch.gd" id="1_wyyi7"]
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_r1u0h"]
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="3_dmb4a"]
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="4_pp7si"]
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/ЭМС.tscn" id="5_kbxv3"]
[node name="tab_switch" type="TabContainer"]
offset_right = 1600.0
offset_bottom = 1200.0
script = ExtResource("1_dsbbu")
script = ExtResource("1_wyyi7")
[node name="работа" parent="." instance=ExtResource("2_kenm6")]
[node name="работа" parent="." instance=ExtResource("2_r1u0h")]
layout_mode = 2
[node name="контроль" parent="." instance=ExtResource("3_2fkox")]
[node name="контроль" parent="." instance=ExtResource("3_dmb4a")]
visible = false
layout_mode = 2
[node name="журнал" parent="." instance=ExtResource("4_2se5x")]
[node name="журнал" parent="." instance=ExtResource("4_pp7si")]
visible = false
layout_mode = 2
[node name="ЭМС" parent="." instance=ExtResource("5_2rigj")]
[node name="ЭМС" parent="." instance=ExtResource("5_kbxv3")]
visible = false
layout_mode = 2

View File

@@ -67,9 +67,9 @@ func on_disconnect(tbl, selecter_rows, type_dev: String):
var dev = tbl.get_node_user_data(0, 0)
var user_data: Array = tbl.get_node_user_data(0, selecter_rows[0])
var con_dev = user_data[0]
var con_dev_name: String = con_dev.dev_name
dev.connect_devs.erase(con_dev.dev_name)
con_dev.connect_devs.erase(dev.dev_name)
var connector: String = con_dev.connector
dev.connect_devs.erase(con_dev.connector)
con_dev.connect_devs.erase(dev.connector)
if type_dev == 'вход':
set_in_dev(dev)
set_out_dev(con_dev)
@@ -119,6 +119,7 @@ func init_tbl_in():
$scrollin/tbl_in.set_columns_min_size(column_size)
$scrollin/tbl_in.connect('row_pressed', Callable(self, 'on_row_pressed_in'))
$scrollin/tbl_in.connect('selected_changed', Callable(self, 'on_selected_changed_in'))
header_text[0] = 'Вход'
@@ -131,6 +132,10 @@ func init_tbl_in():
$scrl_in_set/tbl_in_set.connect('selected_changed', Callable(self, 'on_selected_changed_si'))
func on_edit_entry(text : String, entry):
print_debug(text, entry)
func on_selected_changed_in(i_row: int):
var selecter_rows: Array = []
$scrollin/tbl_in.get_selected_rows(selecter_rows)
@@ -154,10 +159,10 @@ func on_selected_changed_si(i_row: int):
return
var out_user_data = $scrl_in_set/tbl_in_set.get_node_user_data(0, i_row)
var dev = out_user_data[0]
var dev_name = dev.dev_name
var connector = dev.connector
for i in range($scrollout/tbl_out.get_rows_count()):
var node = $scrollout/tbl_out.get_node2(0, i)
if dev_name == node.text:
var node = $scrollout/tbl_out.get_node2(1, i)
if connector == node.text:
on_row_pressed_out(i)
@@ -170,6 +175,7 @@ func on_row_pressed_si(i_row: int):
func init_tbl_out():
var header_text = ['Выходы', 'Соединитель', 'мкс', 'мкс', 'Состояние', 'Режим']
var yams_alligment_out: Array = [ HORIZONTAL_ALIGNMENT_LEFT, HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER]
$scrollout/tbl_out.set_header([TableHeader, TableHeader, CellFront, CellFrontRear, TableHeader, TableHeader])
$scrollout/tbl_out.set_header_text(header_text)
for board in g_boards:
@@ -188,6 +194,7 @@ func init_tbl_out():
if i in COLUMN_OPTS_BTN:
cell.text = out_dev.mode
$scrollout/tbl_out.set_columns_min_size([250, 100, 70, 70, 70, 100])
$scrollout/tbl_out.set_columns_alignments(yams_alligment_out)
$scrollout/tbl_out.connect('row_pressed', Callable(self, 'on_row_pressed_out'))
$scrollout/tbl_out.connect('selected_changed', Callable(self, 'on_selected_changed_out'))
@@ -204,10 +211,10 @@ func on_selected_changed_so(i_row: int):
return
var in_user_data = $scrl_out_set/tbl_out_set.get_node_user_data(0, i_row)
var dev = in_user_data[0]
var dev_name = dev.dev_name
var connector = dev.connector
for i in range($scrollin/tbl_in.get_rows_count()):
var node = $scrollin/tbl_in.get_node2(0, i)
if dev_name == node.text:
var node = $scrollin/tbl_in.get_node2(1, i)
if connector == node.text:
on_row_pressed_in(i)
@@ -273,6 +280,7 @@ func set_dev(tbl, dev, row_type, row_type_conn, lbl_text):
disable_edit(tbl, len(row_type_conn), node_index[1])
le_name_out.text = dev_con.dev_name
tbl.set_node_user_data(node_index[0], node_index[1], dev.connect_devs[i])
tbl.connect_columns(self, 'text_submitted', 'on_edit_entry', TABLE_ENTRY_COLUMNS, [])
func on_btn_connect():
@@ -290,14 +298,14 @@ func on_btn_connect():
func add_connection_dev(tbl, dev1, dev2, set_row, user_data):
if not dev1.dev_name in dev2.connect_devs:
if not dev1.connector in dev2.connect_devs:
tbl.add_row(set_row)
var node_index: Array = [0, tbl.get_rows_count() -1]
var le_name: LineEdit = tbl.get_node2(node_index[0], node_index[1])
le_name.text = dev1.dev_name
le_name.text = dev1.connector
disable_edit(tbl, len(set_row), node_index[1])
tbl.set_node_user_data(node_index[0], node_index[1], user_data)
dev2.connect_devs[dev1.dev_name] = user_data
dev2.connect_devs[dev1.connector] = user_data
func disable_edit(tbl, num_col: int, i_row: int):

View File

@@ -1,18 +1,18 @@
[gd_scene load_steps=9 format=3 uid="uid://dab6loryocc73"]
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_212nu"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="2_nb88i"]
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_lj7bb"]
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_pcjk3"]
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_4cobd"]
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_tgu8p"]
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_csaff"]
[ext_resource type="Script" path="res://table/table.gd" id="8_4pl8j"]
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_7ip0t"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="2_85cl8"]
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_mtj4x"]
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_m4ucm"]
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_eeb4o"]
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_kacis"]
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_2f7bd"]
[ext_resource type="Script" path="res://table/table.gd" id="8_1mtjm"]
[node name="ЭМС" type="Panel"]
offset_right = 1598.0
offset_bottom = 1201.0
script = ExtResource("1_212nu")
script = ExtResource("1_7ip0t")
[node name="lbl_online" type="Label" parent="."]
layout_mode = 0
@@ -23,7 +23,7 @@ offset_bottom = 30.0
theme_override_colors/font_color = Color(0, 0.647059, 0.184314, 1)
text = "Ячейка на связи"
[node name="btn_flash_read" parent="." instance=ExtResource("2_nb88i")]
[node name="btn_flash_read" parent="." instance=ExtResource("2_85cl8")]
layout_mode = 0
offset_left = 1446.0
offset_top = 55.0
@@ -31,7 +31,7 @@ offset_right = 1583.0
offset_bottom = 85.0
text = "Прочитать"
[node name="btn_flash_write" parent="." instance=ExtResource("2_nb88i")]
[node name="btn_flash_write" parent="." instance=ExtResource("2_85cl8")]
layout_mode = 0
offset_left = 1446.0
offset_top = 99.0
@@ -48,7 +48,7 @@ offset_bottom = 1016.0
focus_mode = 0
shortcut_feedback = false
shortcut_in_tooltip = false
icon = ExtResource("3_lj7bb")
icon = ExtResource("3_mtj4x")
[node name="btn_save" type="Button" parent="."]
layout_mode = 0
@@ -57,7 +57,7 @@ offset_top = 1017.0
offset_right = 1509.0
offset_bottom = 1073.0
focus_mode = 0
icon = ExtResource("4_pcjk3")
icon = ExtResource("4_m4ucm")
[node name="btn_copy" type="Button" parent="."]
layout_mode = 0
@@ -66,7 +66,7 @@ offset_top = 1074.0
offset_right = 1510.0
offset_bottom = 1130.0
focus_mode = 0
icon = ExtResource("5_4cobd")
icon = ExtResource("5_eeb4o")
[node name="btn_connect" type="Button" parent="."]
layout_mode = 0
@@ -76,7 +76,7 @@ offset_right = 683.0
offset_bottom = 111.0
focus_mode = 0
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
icon = ExtResource("6_tgu8p")
icon = ExtResource("6_kacis")
[node name="btn_disconnect" type="Button" parent="."]
layout_mode = 0
@@ -86,7 +86,7 @@ offset_right = 770.0
offset_bottom = 815.0
focus_mode = 0
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
icon = ExtResource("7_csaff")
icon = ExtResource("7_2f7bd")
[node name="scrollin" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -97,7 +97,7 @@ offset_bottom = 679.0
[node name="tbl_in" type="GridContainer" parent="scrollin"]
layout_mode = 2
script = ExtResource("8_4pl8j")
script = ExtResource("8_1mtjm")
[node name="scrl_files" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -108,7 +108,7 @@ offset_bottom = 1166.0
[node name="tbl_files" type="GridContainer" parent="scrl_files"]
layout_mode = 2
script = ExtResource("8_4pl8j")
script = ExtResource("8_1mtjm")
[node name="scrollout" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -119,7 +119,7 @@ offset_bottom = 679.0
[node name="tbl_out" type="GridContainer" parent="scrollout"]
layout_mode = 2
script = ExtResource("8_4pl8j")
script = ExtResource("8_1mtjm")
[node name="scrl_in_set" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -130,7 +130,7 @@ offset_bottom = 942.0
[node name="tbl_in_set" type="GridContainer" parent="scrl_in_set"]
layout_mode = 2
script = ExtResource("8_4pl8j")
script = ExtResource("8_1mtjm")
[node name="scrl_out_set" type="ScrollContainer" parent="."]
layout_mode = 0
@@ -141,4 +141,4 @@ offset_bottom = 924.0
[node name="tbl_out_set" type="GridContainer" parent="scrl_out_set"]
layout_mode = 2
script = ExtResource("8_4pl8j")
script = ExtResource("8_1mtjm")

View File

@@ -1,19 +1,19 @@
[gd_scene load_steps=10 format=3 uid="uid://b276iygic5itk"]
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_qjoce"]
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_47xio"]
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="2_bl0yt"]
[ext_resource type="PackedScene" uid="uid://bq7haw1ypiv48" path="res://scenes/frame.tscn" id="3_l1omj"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="4_5es2r"]
[ext_resource type="Script" path="res://table/table.gd" id="4_mqhcf"]
[ext_resource type="Script" path="res://scenes/scrl_threats.gd" id="6_nr8d7"]
[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="7_22fjb"]
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_g2xk6"]
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_ijbv2"]
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="3_fppu7"]
[ext_resource type="PackedScene" uid="uid://bq7haw1ypiv48" path="res://scenes/frame.tscn" id="4_35qoc"]
[ext_resource type="Script" path="res://scenes/scrl_threats.gd" id="5_j58w3"]
[ext_resource type="Script" path="res://table/table.gd" id="6_fpdpm"]
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button_flat.tscn" id="7_2sxkw"]
[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="8_68ssn"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5ugj8"]
[node name="Работа" type="Panel"]
script = ExtResource("1_qjoce")
Bip = ExtResource("2_47xio")
script = ExtResource("1_g2xk6")
Bip = ExtResource("2_ijbv2")
col_grey = Color(0.34902, 0.643137, 0.772549, 0.168627)
col_red = Color(1, 0.568627, 0.431373, 0.239216)
drag_scale_band = 0.05
@@ -25,10 +25,10 @@ strob_min_width = 5.0
metadata/_edit_vertical_guides_ = []
metadata/_edit_lock_ = true
[node name="canvas" parent="." instance=ExtResource("2_bl0yt")]
[node name="canvas" parent="." instance=ExtResource("3_fppu7")]
metadata/_edit_lock_ = true
[node name="frm_threats" parent="." instance=ExtResource("3_l1omj")]
[node name="frm_threats" parent="." instance=ExtResource("4_35qoc")]
layout_mode = 0
offset_left = 1121.0
offset_top = 6.0
@@ -37,7 +37,7 @@ offset_bottom = 642.0
script = null
metadata/_edit_lock_ = true
[node name="рамка-параметры-цели" parent="frm_threats" instance=ExtResource("3_l1omj")]
[node name="рамка-параметры-цели" parent="frm_threats" instance=ExtResource("4_35qoc")]
layout_mode = 0
offset_left = 5.0
offset_top = 313.0
@@ -203,14 +203,14 @@ offset_top = 57.0
offset_right = 464.0
offset_bottom = 306.0
horizontal_scroll_mode = 0
script = ExtResource("6_nr8d7")
script = ExtResource("5_j58w3")
[node name="tbl_threats" type="GridContainer" parent="frm_threats/scrl_threats"]
layout_mode = 2
columns = 4
script = ExtResource("4_mqhcf")
script = ExtResource("6_fpdpm")
[node name="рамка-сеансы-помех" parent="." instance=ExtResource("3_l1omj")]
[node name="рамка-сеансы-помех" parent="." instance=ExtResource("4_35qoc")]
layout_mode = 0
offset_left = 1121.0
offset_top = 648.0
@@ -304,7 +304,7 @@ theme_override_colors/font_color = Color(0.729412, 0.729412, 0.729412, 1)
text = "ПД-М4С"
horizontal_alignment = 1
[node name="рамка-помеха" parent="рамка-сеансы-помех" instance=ExtResource("3_l1omj")]
[node name="рамка-помеха" parent="рамка-сеансы-помех" instance=ExtResource("4_35qoc")]
layout_mode = 0
offset_left = 5.0
offset_top = 250.0
@@ -463,7 +463,7 @@ theme_override_colors/font_color = Color(0.729412, 0.729412, 0.729412, 1)
text = "ЛЧМ"
horizontal_alignment = 1
[node name="btn_auto_threat" parent="." instance=ExtResource("4_5es2r")]
[node name="btn_auto_threat" parent="." instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 912.0
offset_top = 67.0
@@ -471,7 +471,7 @@ offset_right = 1102.0
offset_bottom = 117.0
text = "Автоматически"
[node name="btn_strobe" parent="." instance=ExtResource("4_5es2r")]
[node name="btn_strobe" parent="." instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 912.0
offset_top = 6.0
@@ -479,7 +479,7 @@ offset_right = 1102.0
offset_bottom = 56.0
text = "Строб"
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 980.0
@@ -491,7 +491,7 @@ grow_vertical = 2
text = "ОЗП-1"
metadata/rfi_name = "ozp1"
[node name="btn_p4" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p4" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 1052.0
@@ -504,7 +504,7 @@ tooltip_text = "Выбор цели или сектора"
text = "<-"
metadata/rfi_name = "<pick>"
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 840.0
offset_top = 1118.0
@@ -513,7 +513,7 @@ offset_bottom = 1168.0
text = "СВ-М2"
metadata/rfi_name = "svm2"
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 910.0
offset_top = 1118.0
@@ -522,7 +522,7 @@ offset_bottom = 1168.0
text = "K1"
metadata/rfi_name = "k1"
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 770.0
offset_top = 1118.0
@@ -531,7 +531,7 @@ offset_bottom = 1168.0
text = "СВ-И1"
metadata/rfi_name = "svi1"
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 700.0
offset_top = 1118.0
@@ -540,7 +540,7 @@ offset_bottom = 1168.0
text = "ПД-ЧМ"
metadata/rfi_name = "pdchm"
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 630.0
@@ -552,7 +552,7 @@ grow_vertical = 2
text = "ПД-М4С"
metadata/rfi_name = "pdm4s"
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 350.0
offset_top = 1118.0
@@ -561,7 +561,7 @@ offset_bottom = 1168.0
text = "ЛЧМ-1"
metadata/rfi_name = "lchm1"
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 420.0
@@ -573,7 +573,7 @@ grow_vertical = 2
text = "МЧМ-1"
metadata/rfi_name = "mchm1"
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 490.0
@@ -585,7 +585,7 @@ grow_vertical = 2
text = "ПД-М2"
metadata/rfi_name = "pdm2"
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 560.0
@@ -597,7 +597,7 @@ grow_vertical = 2
text = "ПД-М4"
metadata/rfi_name = "pdm4"
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 1
anchors_preset = -1
offset_left = 280.0
@@ -609,7 +609,7 @@ grow_vertical = 2
text = "СРН-М2"
metadata/rfi_name = "srnm2"
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 210.0
offset_top = 1118.0
@@ -618,7 +618,7 @@ offset_bottom = 1168.0
text = "СРН-И1"
metadata/rfi_name = "srni1"
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 140.0
offset_top = 1118.0
@@ -627,7 +627,7 @@ offset_bottom = 1168.0
text = "Откл."
metadata/rfi_name = "<off>"
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("4_5es2r")]
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("7_2sxkw")]
layout_mode = 0
offset_left = 10.0
offset_top = 1118.0
@@ -643,7 +643,7 @@ offset_left = 96.0
offset_top = 109.0
offset_right = 164.0
offset_bottom = 142.0
theme_override_fonts/font = ExtResource("7_22fjb")
theme_override_fonts/font = ExtResource("8_68ssn")
theme_override_font_sizes/font_size = 20
text = "88"
vertical_alignment = 1
@@ -652,7 +652,7 @@ vertical_alignment = 1
layout_mode = 0
offset_right = 68.0
offset_bottom = 33.0
theme_override_fonts/font = ExtResource("7_22fjb")
theme_override_fonts/font = ExtResource("8_68ssn")
theme_override_font_sizes/font_size = 20
text = "00"
vertical_alignment = 1
@@ -664,7 +664,7 @@ offset_left = 96.0
offset_top = 29.0
offset_right = 188.0
offset_bottom = 88.0
theme_override_fonts/font = ExtResource("7_22fjb")
theme_override_fonts/font = ExtResource("8_68ssn")
theme_override_font_sizes/font_size = 56
text = "88"
@@ -672,7 +672,7 @@ text = "88"
layout_mode = 0
offset_right = 92.0
offset_bottom = 59.0
theme_override_fonts/font = ExtResource("7_22fjb")
theme_override_fonts/font = ExtResource("8_68ssn")
theme_override_font_sizes/font_size = 56
text = "00"

View File

@@ -1,25 +1,25 @@
[gd_scene load_steps=7 format=3 uid="uid://by22sta8tt8dn"]
[ext_resource type="Script" path="res://scenes/состояния-эмс.gd" id="1_s6uih"]
[ext_resource type="Texture2D" uid="uid://belwchvdktrw0" path="res://data/эмс-бланк.png" id="2_ljmns"]
[ext_resource type="Texture2D" uid="uid://bwddxs24es81u" path="res://data/эмс-бланк-пост.png" id="3_n378u"]
[ext_resource type="Texture2D" uid="uid://pfoscstbm025" path="res://data/эмс-бланк-перем.png" id="4_nojeb"]
[ext_resource type="Texture2D" uid="uid://dvl3sq036gn75" path="res://data/эмс-бланк-замыкание.png" id="5_lomie"]
[ext_resource type="Script" path="res://scenes/состояния-эмс.gd" id="1_do21t"]
[ext_resource type="Texture2D" uid="uid://belwchvdktrw0" path="res://data/эмс-бланк.png" id="2_m87j8"]
[ext_resource type="Texture2D" uid="uid://bwddxs24es81u" path="res://data/эмс-бланк-пост.png" id="3_vjums"]
[ext_resource type="Texture2D" uid="uid://pfoscstbm025" path="res://data/эмс-бланк-перем.png" id="4_fejul"]
[ext_resource type="Texture2D" uid="uid://dvl3sq036gn75" path="res://data/эмс-бланк-замыкание.png" id="5_72oii"]
[sub_resource type="SpriteFrames" id="SpriteFrames_ow7xh"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_ljmns")
"texture": ExtResource("2_m87j8")
}, {
"duration": 1.0,
"texture": ExtResource("3_n378u")
"texture": ExtResource("3_vjums")
}, {
"duration": 1.0,
"texture": ExtResource("4_nojeb")
"texture": ExtResource("4_fejul")
}, {
"duration": 1.0,
"texture": ExtResource("5_lomie")
"texture": ExtResource("5_72oii")
}],
"loop": true,
"name": &"default",
@@ -31,11 +31,13 @@ layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1540.0
offset_bottom = -1182.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_s6uih")
script = ExtResource("1_do21t")
[node name="sprite" type="AnimatedSprite2D" parent="."]
position = Vector2(14, 9)
position = Vector2(34, 9)
sprite_frames = SubResource("SpriteFrames_ow7xh")
frame = 2

View File

@@ -1,38 +1,5 @@
extends Node
# Таблица с данными для входов, первое значение - индекс устройства в ячейке КЭМС
const INPUT_ROWS0 = [
[1,['1111 МР-231S, УИЗП', 'X31', '0.00', '0.00']],
[2,['2222 МР-231S, Строб ЭМС', 'X32', '0.00', '0.00']],
[3,['3НРЛС МР-231-3, УИЗП', 'X34', '0.00', '0.00']],
[4,['4НРЛС МР-231-3, Строб ЭМС', 'X35', '0.00', '0.00']],
[5,['5ЦИСВС-1010, УИЗП', 'X43', '0.00', '0.00']],
[8,['64302-01, 4302-04, УИЗП', 'X46', '0.00', '0.00']],
[11,['7НРЛС МР-231S, УИЗП', 'X51', '0.00', '0.00']],
[22,['8222 МР-231S, Строб ЭМС', 'X32', '0.00', '0.00']],
[23,['9РЛС МР-231-3, УИЗП', 'X34', '0.00', '0.00']],
[24,['10НРЛС МР-231-3, Строб ЭМС', 'X35', '0.00', '0.00']],
[25,['11ЦИСВС-1010, УИЗП', 'X43', '0.00', '0.00']],
[28,['124302-01, 4302-04, УИЗП', 'X46', '0.00', '0.00']],
[21,['13НРЛС МР-231S, УИЗП', 'X51', '0.00', '0.00']]]
# Таблица с данными для выходов, первое значение - индекс устройства в ячейке КЭМС
const OUTPUT_ROWS0 = [
[41,['15НРЛС МР-231S, БИ', 'X61', '0.00', '0.00']],
[42,['16НРЛС МР-231S', 'X62', '0.00', '0.00']],
[43,['17НРЛС МР-231-3, БИ', 'X64', '0.00', '0.00']],
[44,['18НРЛС МР-231-3', 'X65', '0.00', '0.00']],
[45,['19ЦИСВС-1010, БИ', 'X63', '0.00', '0.00']],
[46,['204302-01, 4302-04, БИ', 'X66', '0.00', '0.00']],
[48,['21НРЛС 11111111', 'X69', '0.00', '0.00']],
[52,['22НРЛС МР-231S', 'X62', '0.00', '0.00']],
[53,['23НРЛС МР-231-3, БИ', 'X64', '0.00', '0.00']],
[54,['24НРЛС МР-231-3', 'X65', '0.00', '0.00']],
[55,['25ЦИСВС-1010, БИ', 'X63', '0.00', '0.00']],
[56,['264302-01, 4302-04, БИ', 'X66', '0.00', '0.00']],
[58,['27НРЛС 11111111', 'X69', '0.00', '0.00']]]
const INPUT_ROWS1 = [
[12,['283333 МР-231S, Строб ЭМС', 'X52', '0.00', '0.00']],
[13,['29НРЛС МР-231-3, УИЗП', 'X54', '0.00', '0.00']],
@@ -64,6 +31,7 @@ const OUTPUT_ROWS1 = [
[66,['524302-01, 4302-04, БИ', 'X66', '0.00', '0.00']],
[68,['53НРЛС 11111111', 'X69', '0.00', '0.00']]]
# Таблица с данными для входов, первое значение - индекс устройства в ячейке КЭМС
const INPUT_ROWS = [
[1,['УИЗП №1', 'Х7', '0.00', '0.00']],
[2,['УИЗПФ №1', 'Х8', '0.00', '0.00']],
@@ -124,6 +92,7 @@ const INPUT_ROWS = [
[57,['СЗИ Е Лб','Х49 : 1', '0.00', '0.00']],
[58,['СЗИ Е ПрБ','Х49 : 50', '0.00', '0.00']]]
# Таблица с данными для выходов, первое значение - индекс устройства в ячейке КЭМС
const OUTPUT_ROWS = [
[11,['Бланк №1','Х6', '0.00', '0.00']],
[12,['Бланк №2','Х9', '0.00', '0.00']],