diff --git a/project.godot b/project.godot index c9ee8f15..27470bc2 100644 --- a/project.godot +++ b/project.godot @@ -168,6 +168,7 @@ folder_colors={ "res://scenes/bip/": "blue", "res://scenes/button-flat/": "blue", "res://scenes/button-scale/": "blue", +"res://scenes/button-six-state/": "blue", "res://scenes/cell/": "blue", "res://scenes/count-all/": "blue", "res://scenes/count-danger/": "blue", diff --git a/scenes/button-six-state/six-state.tscn b/scenes/button-six-state/six-state.tscn new file mode 100644 index 00000000..c3a2d826 --- /dev/null +++ b/scenes/button-six-state/six-state.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=3 format=3 uid="uid://cixwl6xi22buo"] + +[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="1_ufod8"] + +[sub_resource type="GDScript" id="GDScript_ufod8"] +script/source = "@tool +extends GridContainer + +@export_file var image_states: Array[String] +var txr_states: Array[CompressedTexture2D] + +@export var state: int = 0: + set(val): + state = val % image_states.size() + if is_inside_tree(): + val %= txr_states.size() + state = val + $done.texture = txr_states[val] + + +func _enter_tree() -> void: + for fn in image_states: + txr_states.append(load(fn)) + $done.texture = txr_states[state] +" + +[node name="six-state" type="GridContainer"] +offset_right = 156.0 +offset_bottom = 24.0 +grow_horizontal = 2 +grow_vertical = 2 +columns = 3 +script = SubResource("GDScript_ufod8") +image_states = Array[String](["uid://c6nve6f8sfyj2", "uid://dnreyfh3cd1k2", "uid://c6booa8753u5t"]) + +[node name="done" type="TextureRect" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +texture = ExtResource("1_ufod8") +expand_mode = 3 + +[node name="text" type="Label" parent="."] +layout_mode = 2 +size_flags_horizontal = 6 +size_flags_vertical = 6 +text = "Запрещено" +horizontal_alignment = 1 + +[node name="check" type="CheckButton" parent="."] +layout_mode = 2 +size_flags_horizontal = 8 diff --git a/scenes/hranges/panel.tscn b/scenes/hranges/panel.tscn index c6720139..b3129a20 100644 --- a/scenes/hranges/panel.tscn +++ b/scenes/hranges/panel.tscn @@ -9,6 +9,5 @@ offset_right = 690.0 offset_bottom = 75.0 theme_override_styles/panel = SubResource("StyleBoxFlat_ajqhv") script = ExtResource("1_pg3d7") -lines_count = null [connection signal="resized" from="." to="." method="_on_resized"] diff --git a/scenes/эмс2/эмс2.tscn b/scenes/эмс2/эмс2.tscn index 23de2d88..20e79ad4 100644 --- a/scenes/эмс2/эмс2.tscn +++ b/scenes/эмс2/эмс2.tscn @@ -3,6 +3,7 @@ [ext_resource type="Texture2D" uid="uid://hkcvl2waf63s" path="res://data/вид сверху.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://data/OP-63.png" id="3_8gk36"] +[ext_resource type="PackedScene" uid="uid://hr55mkcneaer" path="res://scenes/hranges/panel.tscn" id="3_b5v2s"] [ext_resource type="Texture2D" uid="uid://b85f1ne2wrwhg" path="res://data/Состояние РЭС 4.png" id="4_b5v2s"] [ext_resource type="Texture2D" uid="uid://073el51yholj" path="res://data/454.png" id="4_nqi0i"] [ext_resource type="Texture2D" uid="uid://cckk3jk5r32bh" path="res://data/ГО.png" id="5_e7tlv"] @@ -33,9 +34,7 @@ [ext_resource type="Texture2D" uid="uid://7ody4v7qy36g" path="res://data/Скруглённый прямоугольник серый.png" id="31_b5v2s"] [ext_resource type="Texture2D" uid="uid://carr8bw5rwiwj" path="res://data/Кнопка подтверждения01.png" id="32_p41nv"] [ext_resource type="Texture2D" uid="uid://3siondd3feev" path="res://data/Скруглённый прямоугольник белый.png" id="33_5ifkb"] -[ext_resource type="Texture2D" uid="uid://csxruavk0s40l" path="res://data/Окно частот0.png" id="34_b5v2s"] - -[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_5u4bk"] +[ext_resource type="PackedScene" uid="uid://ch14g46swx74h" path="res://table/header.tscn" id="35_p41nv"] [node name="Panel" type="Panel"] script = ExtResource("1_l3ueu") @@ -47,15 +46,199 @@ rotation = 1.5708 scale = Vector2(0.325, 0.325) texture = ExtResource("1_b7vcf") -[node name="частоты" type="TextureRect" parent="."] +[node name="приём" type="GridContainer" parent="."] layout_mode = 0 offset_left = 32.0 -offset_top = 240.0 -offset_right = 1649.0 -offset_bottom = 813.0 +offset_top = 262.0 +offset_right = 1635.0 +offset_bottom = 494.0 scale = Vector2(0.95, 0.95) -texture = SubResource("CompressedTexture2D_5u4bk") -expand_mode = 1 +columns = 2 + +[node name="label0" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ОР-63" + +[node name="panel0" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label1" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "454" + +[node name="panel1" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label2" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ГО" + +[node name="panel2" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label3" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "РЛС1" + +[node name="panel3" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label4" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "РЛС2" + +[node name="panel4" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label5" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ННВС" + +[node name="panel5" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label6" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "Изделие 7" + +[node name="panel6" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label7" type="Label" parent="приём"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "Изделие 8" + +[node name="panel7" parent="приём" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="передача" type="GridContainer" parent="."] +layout_mode = 0 +offset_left = 32.0 +offset_top = 534.0 +offset_right = 1635.0 +offset_bottom = 766.0 +scale = Vector2(0.95, 0.95) +columns = 2 + +[node name="label0" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ОР-63" + +[node name="panel0" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label1" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "454" + +[node name="panel1" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label2" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ГО" + +[node name="panel2" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label3" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "РЛС1" + +[node name="panel3" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label4" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "РЛС2" + +[node name="panel4" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label5" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ННВС" + +[node name="panel5" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label6" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "Изделие 7" + +[node name="panel6" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="label7" type="Label" parent="передача"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "Изделие 8" + +[node name="panel7" parent="передача" instance=ExtResource("3_b5v2s")] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 [node name="Op-63" type="TextureRect" parent="."] layout_mode = 0 @@ -106,15 +289,6 @@ 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 @@ -403,12 +577,12 @@ position = Vector2(196, 196) texture = ExtResource("26_2spgl") [node name="СкруглённыйПрямоугСалатный" type="Sprite2D" parent="."] -position = Vector2(101, 828) +position = Vector2(116, 1288) scale = Vector2(1.74359, 1.16667) texture = ExtResource("29_5u4bk") [node name="СкруглённыйПрямоугСалатный12" type="Sprite2D" parent="."] -position = Vector2(220, 828) +position = Vector2(235, 1288) scale = Vector2(1.33333, 1.16667) texture = ExtResource("29_5u4bk") @@ -558,7 +732,7 @@ horizontal_alignment = 1 metadata/_edit_use_anchors_ = true [node name="СкруглённыйПрямоугольникБелый" type="Sprite2D" parent="."] -position = Vector2(102, 871) +position = Vector2(117, 1331) scale = Vector2(1.41304, 1) texture = ExtResource("31_b5v2s") @@ -599,20 +773,10 @@ position = Vector2(0, 261) texture = ExtResource("31_b5v2s") [node name="КнопкаПодтверждения01" type="Sprite2D" parent="."] -position = Vector2(996.247, 871.25) +position = Vector2(1011.25, 1331.25) scale = Vector2(1.37999, 1.28261) texture = ExtResource("32_p41nv") -[node name="Label3" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -681.34 -offset_top = -10.3305 -offset_right = -613.34 -offset_bottom = 8.66949 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - [node name="СкруглённыйПрямоугольникБелый11" type="Sprite2D" parent="КнопкаПодтверждения01"] position = Vector2(-562.5, -0.194946) scale = Vector2(0.819155, 0.77966) @@ -1205,115 +1369,118 @@ position = Vector2(54.8907, 203.296) scale = Vector2(0.378072, 0.77966) texture = ExtResource("31_b5v2s") -[node name="Label4" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -596.558 -offset_top = -9.55084 -offset_right = -528.558 -offset_bottom = 9.44916 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label5" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -521.195 -offset_top = -10.3305 -offset_right = -453.195 -offset_bottom = 8.66949 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label6" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -445.834 -offset_top = -9.55084 -offset_right = -377.834 -offset_bottom = 9.44916 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label7" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -370.471 -offset_top = -9.55084 -offset_right = -302.471 -offset_bottom = 9.44916 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label8" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -295.109 -offset_top = -9.55084 -offset_right = -227.109 -offset_bottom = 9.44916 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label9" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -219.746 -offset_top = -9.55084 -offset_right = -151.746 -offset_bottom = 9.44916 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label10" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -144.384 -offset_top = -9.55084 -offset_right = -76.384 -offset_bottom = 9.44916 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label11" type="Label" parent="КнопкаПодтверждения01"] -offset_left = -61.0507 -offset_top = -10.3305 -offset_right = -49.0507 -offset_bottom = 8.66949 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="Label12" type="Label" parent="КнопкаПодтверждения01"] -offset_left = 49.0936 -offset_top = -10.3305 -offset_right = 61.0936 -offset_bottom = 8.66949 -theme_override_colors/font_color = Color(0, 0, 0, 1) -text = "--" -horizontal_alignment = 1 -metadata/_edit_use_anchors_ = true - -[node name="ТаблицаЧастот" type="Sprite2D" parent="."] -position = Vector2(800, 502.25) -scale = Vector2(0.987573, 0.885314) -texture = ExtResource("34_b5v2s") - -[node name="Label" type="Label" parent="ТаблицаЧастот"] -offset_left = -6.0755 -offset_top = -293.757 -offset_right = 66.9245 -offset_bottom = -274.757 -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_font_sizes/font_size = 16 -text = "Излучение" - -[node name="Label2" type="Label" parent="ТаблицаЧастот"] -offset_left = 8.10067 -offset_top = -7.05967 -offset_right = 65.1007 -offset_bottom = 11.9403 -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_font_sizes/font_size = 16 +[node name="label_rx" type="Label" parent="."] +layout_mode = 0 +offset_left = 32.0 +offset_top = 240.0 +offset_right = 1555.0 +offset_bottom = 259.0 +text = "Приём" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="label_tx" type="Label" parent="."] +layout_mode = 0 +offset_left = 33.0 +offset_top = 510.0 +offset_right = 1555.0 +offset_bottom = 529.0 +text = "Передача" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="label8" type="Label" parent="."] +layout_mode = 0 +offset_left = 161.0 +offset_top = 60.0 +offset_right = 203.0 +offset_bottom = 79.0 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ОР-63" + +[node name="label9" type="Label" parent="."] +layout_mode = 2 +offset_left = 510.0 +offset_top = 64.0 +offset_right = 527.0 +offset_bottom = 83.0 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ГО" + +[node name="label10" type="Label" parent="."] +layout_mode = 2 +offset_left = 320.0 +offset_top = 60.0 +offset_right = 349.0 +offset_bottom = 79.0 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "454" + +[node name="label11" type="Label" parent="."] +layout_mode = 2 +offset_left = 940.0 +offset_top = 60.0 +offset_right = 976.0 +offset_bottom = 79.0 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "РЛС2" + +[node name="label12" type="Label" parent="."] +layout_mode = 2 +offset_left = 745.0 +offset_top = 60.0 +offset_right = 781.0 +offset_bottom = 79.0 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "РЛС1" + +[node name="label13" type="Label" parent="."] +layout_mode = 2 +offset_left = 1250.0 +offset_top = 65.0 +offset_right = 1290.0 +offset_bottom = 84.0 +size_flags_horizontal = 4 +size_flags_vertical = 6 +text = "ННВС" + +[node name="GridContainer" type="GridContainer" parent="."] +layout_mode = 0 +offset_left = 52.0 +offset_top = 800.0 +offset_right = 1199.0 +offset_bottom = 1140.0 +columns = 7 + +[node name="header0" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 +text = "Изделие" + +[node name="header1" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 +text = "Кластер" + +[node name="header2" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 +text = "Азимут" + +[node name="header3" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 +text = "Угол места" + +[node name="header4" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 +text = "Диапазон" + +[node name="header5" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 +text = "Передача" + +[node name="header6" parent="GridContainer" instance=ExtResource("35_p41nv")] +layout_mode = 2 text = "Приём"