From c4a6acc02bb9e5a05261064a701f59a8dabe4f05 Mon Sep 17 00:00:00 2001 From: sasha80 Date: Thu, 31 Oct 2024 16:26:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=9E=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=BE=D1=81=D1=82=D0=BE=D1=8F?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=A93=20(=D0=A9-3)=20=D0=B2=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B6=D0=B8=D0=BC=D0=B5=20=D0=9A=D0=BE=D0=BD=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/pribor-uyep/pribor-uyep.tscn | 35 ++- scenes/pribor-uyep/sch3-view.gd | 4 + scenes/pribor-uyep/sch3.tscn | 427 ++++++++++++++++++++++++++++ 3 files changed, 453 insertions(+), 13 deletions(-) create mode 100644 scenes/pribor-uyep/sch3-view.gd create mode 100644 scenes/pribor-uyep/sch3.tscn diff --git a/scenes/pribor-uyep/pribor-uyep.tscn b/scenes/pribor-uyep/pribor-uyep.tscn index 0d099151..dd4ff22f 100644 --- a/scenes/pribor-uyep/pribor-uyep.tscn +++ b/scenes/pribor-uyep/pribor-uyep.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://bs7h65e7bodp3"] +[gd_scene load_steps=9 format=3 uid="uid://bs7h65e7bodp3"] [ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="1_6olof"] [ext_resource type="Script" path="res://scenes/контроль/прибор.gd" id="1_46rp6"] @@ -6,6 +6,8 @@ [ext_resource type="Script" path="res://scenes/pribor-uyep/spt25-view.gd" id="4_v0lil"] [ext_resource type="PackedScene" uid="uid://bsixhjfesq6r4" path="res://scenes/pribor-uyep/block-output.tscn" id="5_x74mk"] [ext_resource type="PackedScene" uid="uid://btpc78gucr57f" path="res://scenes/контроль/элемент-я.tscn" id="6_60xs3"] +[ext_resource type="PackedScene" uid="uid://5c24lfvp72en" path="res://scenes/pribor-uyep/sch3.tscn" id="7_13r50"] +[ext_resource type="Script" path="res://scenes/pribor-uyep/sch3-view.gd" id="8_4t3jv"] [node name="pribor_uyep" type="Control"] layout_mode = 3 @@ -39,20 +41,20 @@ vertical_alignment = 1 [node name="Label" type="Label" parent="."] self_modulate = Color(0.835294, 0.141176, 0.286275, 1) layout_mode = 0 -offset_left = 135.0 -offset_top = 990.0 -offset_right = 665.0 -offset_bottom = 1009.0 +offset_left = 145.0 +offset_top = 1055.0 +offset_right = 675.0 +offset_bottom = 1074.0 text = "** Позиционные обозначения требуют уточнения **" horizontal_alignment = 1 vertical_alignment = 1 [node name="spt25_A1" parent="." instance=ExtResource("6_60xs3")] layout_mode = 0 -offset_left = 135.0 -offset_top = 485.0 -offset_right = 375.0 -offset_bottom = 895.0 +offset_left = 175.0 +offset_top = 275.0 +offset_right = 415.0 +offset_bottom = 685.0 script = ExtResource("4_v0lil") unit_name = "уарэп-спт25-1" fname = "СПТ-25-230-400" @@ -83,10 +85,10 @@ offset_bottom = 367.0 [node name="spt25_A2" parent="." instance=ExtResource("6_60xs3")] layout_mode = 0 -offset_left = 435.0 -offset_top = 485.0 -offset_right = 675.0 -offset_bottom = 895.0 +offset_left = 440.0 +offset_top = 275.0 +offset_right = 680.0 +offset_bottom = 685.0 script = ExtResource("4_v0lil") unit_name = "уарэп-спт25-2" fname = "СПТ-25-230-400" @@ -114,3 +116,10 @@ offset_left = 15.0 offset_top = 275.0 offset_right = 225.0 offset_bottom = 367.0 + +[node name="sch3" parent="." instance=ExtResource("7_13r50")] +offset_left = 175.0 +offset_top = 714.0 +offset_right = 680.0 +offset_bottom = 929.0 +script = ExtResource("8_4t3jv") diff --git a/scenes/pribor-uyep/sch3-view.gd b/scenes/pribor-uyep/sch3-view.gd new file mode 100644 index 00000000..c21f0108 --- /dev/null +++ b/scenes/pribor-uyep/sch3-view.gd @@ -0,0 +1,4 @@ +@tool + +extends "res://scenes/контроль/элемент-я.gd" + diff --git a/scenes/pribor-uyep/sch3.tscn b/scenes/pribor-uyep/sch3.tscn new file mode 100644 index 00000000..d860817d --- /dev/null +++ b/scenes/pribor-uyep/sch3.tscn @@ -0,0 +1,427 @@ +[gd_scene load_steps=12 format=3 uid="uid://5c24lfvp72en"] + +[ext_resource type="Script" path="res://scenes/контроль/элемент-я.gd" id="1_mb0l2"] +[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="2_qglal"] +[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="3_gqvwf"] +[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="4_2lj00"] +[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="5_eanbw"] + +[sub_resource type="GDScript" id="GDScript_45hqb"] +script/source = "@tool + +extends MarginContainer + + +func _enter_tree() -> void: + margins = [8, 8, 8, 8] + + +@export var margins: Array: + set(vals): + add_theme_constant_override('margin_top', vals[0]) + add_theme_constant_override('margin_left', vals[1]) + add_theme_constant_override('margin_bottom', vals[2]) + add_theme_constant_override('margin_right', vals[3]) + get: + var vals = [0, 0, 0, 0] + vals[0] = get_theme_constant('margin_top') + vals[1] = get_theme_constant('margin_left') + vals[2] = get_theme_constant('margin_bottom') + vals[3] = get_theme_constant('margin_right') + return vals + + +" + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"] + +[node name="sch3" type="Control"] +editor_description = "Элемент замены из ЗИП" +custom_minimum_size = Vector2(32, 32) +layout_mode = 3 +anchors_preset = 0 +offset_left = 125.0 +offset_top = 635.0 +offset_right = 635.0 +offset_bottom = 855.0 +script = ExtResource("1_mb0l2") +textures = [ExtResource("2_qglal"), ExtResource("3_gqvwf"), ExtResource("4_2lj00")] + +[node name="rect" type="NinePatchRect" parent="."] +layout_mode = 2 +offset_right = 510.0 +offset_bottom = 220.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = ExtResource("5_eanbw") +draw_center = false +region_rect = Rect2(0, 0, 63, 63) +patch_margin_left = 17 +patch_margin_top = 17 +patch_margin_right = 17 +patch_margin_bottom = 15 + +[node name="margin" type="MarginContainer" parent="."] +layout_mode = 2 +offset_right = 510.0 +offset_bottom = 220.0 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 +script = SubResource("GDScript_45hqb") +margins = [8, 8, 8, 8] + +[node name="vbox" type="VBoxContainer" parent="margin"] +layout_mode = 2 + +[node name="grid" type="GridContainer" parent="margin/vbox"] +layout_mode = 2 +columns = 3 + +[node name="state" type="TextureRect" parent="margin/vbox/grid"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 + +[node name="fname" type="Label" parent="margin/vbox/grid"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 6 +theme_override_font_sizes/font_size = 17 +text = "Щ-3" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="rname" type="Label" parent="margin/vbox/grid"] +layout_mode = 2 +size_flags_horizontal = 10 +size_flags_vertical = 6 +theme_override_font_sizes/font_size = 22 +text = "A3" +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="table" type="GridContainer" parent="margin/vbox"] +layout_mode = 2 +columns = 8 + +[node name="state0" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 0, 2, 0] + +[node name="name0" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "УФ" + +[node name="state1" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 1, 2, 1] + +[node name="name1" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "РТР" + +[node name="state2" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 2, 2, 2] + +[node name="name2" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-Н.1" + +[node name="state3" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 3, 2, 3] + +[node name="name3" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-Н.2" + +[node name="state4" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 4, 2, 4] + +[node name="name4" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-Н.3" + +[node name="state5" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 5, 2, 5] + +[node name="name5" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-Н.4" + +[node name="state6" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 6, 2, 6] + +[node name="name6" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-В.1" + +[node name="state7" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 7, 2, 7] + +[node name="name7" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-В.2" + +[node name="state8" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 8, 2, 8] + +[node name="name8" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-В.3" + +[node name="state9" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 9, 2, 9] + +[node name="name9" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-В.4" + +[node name="state10" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 10, 2, 10] + +[node name="name10" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-К.1" + +[node name="state11" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [0, 11, 2, 11] + +[node name="name11" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-К.2" + +[node name="state12" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 0, 3, 0] + +[node name="name12" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-К.3" + +[node name="state13" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 1, 3, 1] + +[node name="name13" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ПРД-К.4" + +[node name="state14" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 2, 3, 2] + +[node name="name14" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "Бл. по вент." + +[node name="state15" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 3, 3, 3] + +[node name="name15" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "ДУ" + +[node name="state16" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 7, 3, 7] + +[node name="name16" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "Вент. РТР" + +[node name="state17" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 8, 3, 8] + +[node name="name17" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "Вент. ПРД.1" + +[node name="state18" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 9, 3, 9] + +[node name="name18" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "Вент. ПРД.2" + +[node name="state19" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 10, 3, 10] + +[node name="name19" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "Вент. ПРД.3" + +[node name="state20" type="TextureRect" parent="margin/vbox/table"] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +texture = ExtResource("2_qglal") +expand_mode = 1 +metadata/bits = [1, 11, 3, 11] + +[node name="name20" type="Label" parent="margin/vbox/table"] +self_modulate = Color(1, 1, 1, 0.627451) +layout_mode = 2 +theme_override_font_sizes/font_size = 17 +text = "Вент. ПРД.4" + +[node name="button" type="Button" parent="."] +layout_mode = 2 +offset_right = 510.0 +offset_bottom = 220.0 +theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw") +theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa") +theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw") +theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms") +theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06") + +[connection signal="resized" from="." to="." method="_on_resized"] +[connection signal="pressed" from="button" to="." method="_on_button_pressed"]