From 7fb071b6f500fb79eba6891685b832054d324f73 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Mon, 23 Jan 2023 15:40:15 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control.tscn | 19 ++++++++++++++++-- data/Грани22.png.import | 35 ++++++++++++++++++++++++++++++++++ data/Изделие МП-550.png.import | 35 ++++++++++++++++++++++++++++++++++ data/П16.png.import | 35 ++++++++++++++++++++++++++++++++++ data/ПРД.png.import | 35 ++++++++++++++++++++++++++++++++++ data/СПТ.png.import | 35 ++++++++++++++++++++++++++++++++++ data/УФ.png.import | 35 ++++++++++++++++++++++++++++++++++ data/Щ3.png.import | 35 ++++++++++++++++++++++++++++++++++ main.gd | 15 +++++++++++++++ pribor_UF.tscn | 10 ++++++++++ project.godot | 1 - Контроль.gd | 20 +++++++++++++++++++ 12 files changed, 307 insertions(+), 3 deletions(-) create mode 100644 data/Грани22.png.import create mode 100644 data/Изделие МП-550.png.import create mode 100644 data/П16.png.import create mode 100644 data/ПРД.png.import create mode 100644 data/СПТ.png.import create mode 100644 data/УФ.png.import create mode 100644 data/Щ3.png.import create mode 100644 main.gd create mode 100644 pribor_UF.tscn create mode 100644 Контроль.gd diff --git a/Control.tscn b/Control.tscn index 5894df7..0abc59f 100644 --- a/Control.tscn +++ b/Control.tscn @@ -1,7 +1,10 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://data/DejaVuSansCondensed.ttf" type="DynamicFontData" id=1] [ext_resource path="res://data/мп550-работа-эскиз.png" type="Texture" id=2] +[ext_resource path="res://main.gd" type="Script" id=3] +[ext_resource path="res://data/УФ.png" type="Texture" id=4] +[ext_resource path="res://Контроль.gd" type="Script" id=5] [sub_resource type="DynamicFont" id=1] size = 20 @@ -23,6 +26,7 @@ anchor_bottom = 1.0 rect_pivot_offset = Vector2( 800, 600 ) custom_fonts/font = SubResource( 1 ) tab_align = 0 +script = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": true } @@ -42,10 +46,21 @@ scale = Vector2( 1.00375, 0.973333 ) texture = ExtResource( 2 ) [node name="Контроль" type="Panel" parent="."] -visible = false anchor_right = 1.0 anchor_bottom = 1.0 margin_left = 4.0 margin_top = 42.0 margin_right = -4.0 margin_bottom = -4.0 +script = ExtResource( 5 ) + +[node name="pribor_UF" type="TextureButton" parent="Контроль"] +margin_left = 1048.0 +margin_top = 542.0 +margin_right = 1100.0 +margin_bottom = 658.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 4 ) +expand = true +stretch_mode = 4 diff --git a/data/Грани22.png.import b/data/Грани22.png.import new file mode 100644 index 0000000..9549709 --- /dev/null +++ b/data/Грани22.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Грани22.png-493da837cf4c5e4bcc358b597e0bef6b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/Грани22.png" +dest_files=[ "res://.import/Грани22.png-493da837cf4c5e4bcc358b597e0bef6b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/data/Изделие МП-550.png.import b/data/Изделие МП-550.png.import new file mode 100644 index 0000000..60c3eea --- /dev/null +++ b/data/Изделие МП-550.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Изделие МП-550.png-aa08827e688aa0a8c85fe1ebf96c39ec.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/Изделие МП-550.png" +dest_files=[ "res://.import/Изделие МП-550.png-aa08827e688aa0a8c85fe1ebf96c39ec.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/data/П16.png.import b/data/П16.png.import new file mode 100644 index 0000000..648a1fc --- /dev/null +++ b/data/П16.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/П16.png-bf31d24368470afda2405017885d019f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/П16.png" +dest_files=[ "res://.import/П16.png-bf31d24368470afda2405017885d019f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/data/ПРД.png.import b/data/ПРД.png.import new file mode 100644 index 0000000..329bf5d --- /dev/null +++ b/data/ПРД.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ПРД.png-0583ee2ff33bda5b96809f18eb4b6d3c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/ПРД.png" +dest_files=[ "res://.import/ПРД.png-0583ee2ff33bda5b96809f18eb4b6d3c.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/data/СПТ.png.import b/data/СПТ.png.import new file mode 100644 index 0000000..cecdc5f --- /dev/null +++ b/data/СПТ.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/СПТ.png-8f936ad6e2c2488a3dc88469226a44c7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/СПТ.png" +dest_files=[ "res://.import/СПТ.png-8f936ad6e2c2488a3dc88469226a44c7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/data/УФ.png.import b/data/УФ.png.import new file mode 100644 index 0000000..fc8d21f --- /dev/null +++ b/data/УФ.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/УФ.png-1921501d9e9f088f15714b06ceba80a7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/УФ.png" +dest_files=[ "res://.import/УФ.png-1921501d9e9f088f15714b06ceba80a7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/data/Щ3.png.import b/data/Щ3.png.import new file mode 100644 index 0000000..62021f1 --- /dev/null +++ b/data/Щ3.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Щ3.png-0dddb7358beb598783af26f75da91b9a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/Щ3.png" +dest_files=[ "res://.import/Щ3.png-0dddb7358beb598783af26f75da91b9a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/main.gd b/main.gd new file mode 100644 index 0000000..3afd400 --- /dev/null +++ b/main.gd @@ -0,0 +1,15 @@ +extends TabContainer + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +func _input(event: InputEvent): + if event is InputEventKey: + if event.pressed and (event.scancode == KEY_F11): + OS.window_fullscreen = !OS.window_fullscreen + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/pribor_UF.tscn b/pribor_UF.tscn new file mode 100644 index 0000000..84571f6 --- /dev/null +++ b/pribor_UF.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Тестовый lbl1" diff --git a/project.godot b/project.godot index bd5b089..89b9a25 100644 --- a/project.godot +++ b/project.godot @@ -18,7 +18,6 @@ config/icon="res://data/icon.png" window/size/width=1600 window/size/height=1200 -window/size/fullscreen=true window/size/test_width=1600 window/size/test_height=1100 window/vsync/use_vsync=false diff --git a/Контроль.gd b/Контроль.gd new file mode 100644 index 0000000..c6e210a --- /dev/null +++ b/Контроль.gd @@ -0,0 +1,20 @@ +extends Panel + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + $pribor_UF.connect('button_up', self, 'on_pribor_press', ['111']) + + +func on_pribor_press(text: String): + prints(text) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass From 9fbdc4aaa78c03c7182c5af868a91336140d5157 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Wed, 25 Jan 2023 08:44:12 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D1=86=D0=B5=D0=BD=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D1=8F=20=D0=BF=D1=80=D0=B8=D0=B1?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control.tscn | 231 ++++++++++++++++++++++-- consts.gd | 21 +++ pribor_afsp_l.tscn | 10 + pribor_afsp_r.tscn | 10 + pribor_UF.tscn => pribor_afsp_sch3.tscn | 2 +- pribor_prd_k_1.tscn | 10 + pribor_prd_k_2.tscn | 10 + pribor_prd_k_3.tscn | 10 + pribor_prd_k_4.tscn | 10 + pribor_prd_n_1.tscn | 10 + pribor_prd_n_2.tscn | 10 + pribor_prd_n_3.tscn | 10 + pribor_prd_n_4.tscn | 10 + pribor_prd_v_1.tscn | 10 + pribor_prd_v_2.tscn | 10 + pribor_prd_v_3.tscn | 10 + pribor_prd_v_4.tscn | 10 + pribor_rtr.tscn | 10 + pribor_sch3.tscn | 10 + pribor_spt_l.tscn | 10 + pribor_spt_r.tscn | 10 + pribor_uf.tscn | 10 + project.godot | 4 + Контроль.gd | 40 +++- 24 files changed, 465 insertions(+), 23 deletions(-) create mode 100644 consts.gd create mode 100644 pribor_afsp_l.tscn create mode 100644 pribor_afsp_r.tscn rename pribor_UF.tscn => pribor_afsp_sch3.tscn (75%) create mode 100644 pribor_prd_k_1.tscn create mode 100644 pribor_prd_k_2.tscn create mode 100644 pribor_prd_k_3.tscn create mode 100644 pribor_prd_k_4.tscn create mode 100644 pribor_prd_n_1.tscn create mode 100644 pribor_prd_n_2.tscn create mode 100644 pribor_prd_n_3.tscn create mode 100644 pribor_prd_n_4.tscn create mode 100644 pribor_prd_v_1.tscn create mode 100644 pribor_prd_v_2.tscn create mode 100644 pribor_prd_v_3.tscn create mode 100644 pribor_prd_v_4.tscn create mode 100644 pribor_rtr.tscn create mode 100644 pribor_sch3.tscn create mode 100644 pribor_spt_l.tscn create mode 100644 pribor_spt_r.tscn create mode 100644 pribor_uf.tscn diff --git a/Control.tscn b/Control.tscn index bc1c57c..f08c189 100644 --- a/Control.tscn +++ b/Control.tscn @@ -1,9 +1,13 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=11 format=2] +[ext_resource path="res://data/СПТ.png" type="Texture" id=1] [ext_resource path="res://data/мп550-работа-эскиз.png" type="Texture" id=2] [ext_resource path="res://main.gd" type="Script" id=3] [ext_resource path="res://data/УФ.png" type="Texture" id=4] [ext_resource path="res://Контроль.gd" type="Script" id=5] +[ext_resource path="res://data/Грани22.png" type="Texture" id=6] +[ext_resource path="res://data/Щ3.png" type="Texture" id=7] +[ext_resource path="res://data/ПРД.png" type="Texture" id=8] [sub_resource type="DynamicFont" id=2] @@ -12,8 +16,8 @@ resource_local_to_scene = true default_font = SubResource( 2 ) [node name="TabContainer" type="TabContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 +margin_right = 1600.0 +margin_bottom = 1200.0 rect_pivot_offset = Vector2( 800, 600 ) tab_align = 0 script = ExtResource( 3 ) @@ -45,20 +49,221 @@ margin_right = -4.0 margin_bottom = -4.0 script = ExtResource( 5 ) -[node name="pribor_UF" type="TextureButton" parent="Контроль"] -margin_left = 1048.0 -margin_top = 542.0 -margin_right = 1100.0 -margin_bottom = 658.0 +[node name="pribor_uf" type="TextureButton" parent="Контроль"] +margin_left = 1077.0 +margin_top = 411.0 +margin_right = 1129.0 +margin_bottom = 527.0 size_flags_horizontal = 15 size_flags_vertical = 15 texture_normal = ExtResource( 4 ) expand = true stretch_mode = 4 -[node name="Button" type="Button" parent="Контроль"] -margin_left = 480.0 -margin_top = 440.0 +[node name="pribor_rtr" type="TextureButton" parent="Контроль"] +margin_left = 1065.0 +margin_top = 113.0 +margin_right = 1117.0 +margin_bottom = 200.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 1 ) +expand = true +stretch_mode = 4 + +[node name="pribor_afsp_l" type="TextureButton" parent="Контроль"] +margin_left = 877.0 +margin_top = 112.0 +margin_right = 994.0 +margin_bottom = 199.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 6 ) +expand = true +stretch_mode = 4 + +[node name="pribor_afsp_r" type="TextureButton" parent="Контроль"] +margin_left = 1187.0 +margin_top = 116.0 +margin_right = 1304.0 +margin_bottom = 203.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 6 ) +expand = true +stretch_mode = 4 + +[node name="pribor_sch3" type="TextureButton" parent="Контроль"] +margin_left = 1068.0 +margin_top = 760.0 +margin_right = 1124.0 +margin_bottom = 869.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 7 ) +expand = true +stretch_mode = 4 + +[node name="pribor_spt_l" type="TextureButton" parent="Контроль"] +margin_left = 923.0 +margin_top = 774.0 margin_right = 975.0 -margin_bottom = 620.0 -text = "ЖЫШЦЙБЮ" +margin_bottom = 861.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 1 ) +expand = true +stretch_mode = 4 + +[node name="pribor_spt_r" type="TextureButton" parent="Контроль"] +margin_left = 1214.0 +margin_top = 774.0 +margin_right = 1266.0 +margin_bottom = 861.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 1 ) +expand = true +stretch_mode = 4 + +[node name="pribor_prd_v_2" type="TextureButton" parent="Контроль"] +margin_left = 784.0 +margin_top = 155.0 +margin_right = 845.0 +margin_bottom = 246.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 + +[node name="pribor_prd_n_2" type="TextureButton" parent="Контроль"] +margin_left = 782.0 +margin_top = 256.0 +margin_right = 843.0 +margin_bottom = 347.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 + +[node name="pribor_prd_k_2" type="TextureButton" parent="Контроль"] +margin_left = 781.0 +margin_top = 356.0 +margin_right = 842.0 +margin_bottom = 447.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 + +[node name="pribor_prd_v_3" type="TextureButton" parent="Контроль"] +margin_left = 1342.0 +margin_top = 494.0 +margin_right = 1403.0 +margin_bottom = 585.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 +flip_h = true + +[node name="pribor_prd_n_3" type="TextureButton" parent="Контроль"] +margin_left = 1340.0 +margin_top = 595.0 +margin_right = 1401.0 +margin_bottom = 686.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 +flip_h = true + +[node name="pribor_prd_k_3" type="TextureButton" parent="Контроль"] +margin_left = 1342.0 +margin_top = 705.0 +margin_right = 1403.0 +margin_bottom = 796.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 +flip_h = true + +[node name="pribor_prd_v_1" type="TextureButton" parent="Контроль"] +margin_left = 1342.0 +margin_top = 149.0 +margin_right = 1403.0 +margin_bottom = 240.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 +flip_h = true + +[node name="pribor_prd_n_1" type="TextureButton" parent="Контроль"] +margin_left = 1340.0 +margin_top = 250.0 +margin_right = 1401.0 +margin_bottom = 341.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 +flip_h = true + +[node name="pribor_prd_k_1" type="TextureButton" parent="Контроль"] +margin_left = 1339.0 +margin_top = 350.0 +margin_right = 1400.0 +margin_bottom = 441.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 +flip_h = true + +[node name="pribor_prd_v_4" type="TextureButton" parent="Контроль"] +margin_left = 784.0 +margin_top = 511.0 +margin_right = 845.0 +margin_bottom = 602.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 + +[node name="pribor_prd_n_4" type="TextureButton" parent="Контроль"] +margin_left = 782.0 +margin_top = 612.0 +margin_right = 843.0 +margin_bottom = 703.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 + +[node name="pribor_prd_k_4" type="TextureButton" parent="Контроль"] +margin_left = 781.0 +margin_top = 712.0 +margin_right = 842.0 +margin_bottom = 803.0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +texture_normal = ExtResource( 8 ) +expand = true +stretch_mode = 4 + +[node name="scene" type="Panel" parent="Контроль"] +margin_right = 533.0 +margin_bottom = 781.0 diff --git a/consts.gd b/consts.gd new file mode 100644 index 0000000..eaab45f --- /dev/null +++ b/consts.gd @@ -0,0 +1,21 @@ +extends Node + +const PRIBOR_UF = 'res://pribor_uf.tscn' +const PRIBOR_RTR = 'res://pribor_rtr.tscn' +const PRIBOR_AFSP_L = 'res://pribor_afsp_l.tscn' +const PRIBOR_AFSP_R = 'res://pribor_afsp_r.tscn' +const PRIBOR_SCH3 = 'res://pribor_sch3.tscn' +const PRIBOR_SPT_L = 'res://pribor_spt_l.tscn' +const PRIBOR_SPT_R = 'res://pribor_spt_r.tscn' +const PRIBOR_PRD_V_1 = 'res://pribor_prd_v_1.tscn' +const PRIBOR_PRD_N_1 = 'res://pribor_prd_n_1.tscn' +const PRIBOR_PRD_K_1 = 'res://pribor_prd_k_1.tscn' +const PRIBOR_PRD_V_2 = 'res://pribor_prd_v_2.tscn' +const PRIBOR_PRD_N_2 = 'res://pribor_prd_n_2.tscn' +const PRIBOR_PRD_K_2 = 'res://pribor_prd_k_2.tscn' +const PRIBOR_PRD_V_3 = 'res://pribor_prd_v_3.tscn' +const PRIBOR_PRD_N_3 = 'res://pribor_prd_n_3.tscn' +const PRIBOR_PRD_K_3 = 'res://pribor_prd_k_3.tscn' +const PRIBOR_PRD_V_4 = 'res://pribor_prd_v_4.tscn' +const PRIBOR_PRD_N_4 = 'res://pribor_prd_n_4.tscn' +const PRIBOR_PRD_K_4 = 'res://pribor_prd_k_4.tscn' diff --git a/pribor_afsp_l.tscn b/pribor_afsp_l.tscn new file mode 100644 index 0000000..3b6850a --- /dev/null +++ b/pribor_afsp_l.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора АФСП Левый" diff --git a/pribor_afsp_r.tscn b/pribor_afsp_r.tscn new file mode 100644 index 0000000..b3559ea --- /dev/null +++ b/pribor_afsp_r.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора АФСП Правый" diff --git a/pribor_UF.tscn b/pribor_afsp_sch3.tscn similarity index 75% rename from pribor_UF.tscn rename to pribor_afsp_sch3.tscn index 84571f6..4a16ab1 100644 --- a/pribor_UF.tscn +++ b/pribor_afsp_sch3.tscn @@ -7,4 +7,4 @@ margin_left = 12.0 margin_top = 8.0 margin_right = 154.0 margin_bottom = 22.0 -text = "Тестовый lbl1" +text = "Здесь будет схема прибора Щ3" diff --git a/pribor_prd_k_1.tscn b/pribor_prd_k_1.tscn new file mode 100644 index 0000000..7c8ec53 --- /dev/null +++ b/pribor_prd_k_1.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-К 1" diff --git a/pribor_prd_k_2.tscn b/pribor_prd_k_2.tscn new file mode 100644 index 0000000..825a950 --- /dev/null +++ b/pribor_prd_k_2.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-К 2" diff --git a/pribor_prd_k_3.tscn b/pribor_prd_k_3.tscn new file mode 100644 index 0000000..69566e1 --- /dev/null +++ b/pribor_prd_k_3.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-К 3" diff --git a/pribor_prd_k_4.tscn b/pribor_prd_k_4.tscn new file mode 100644 index 0000000..c9e3c4c --- /dev/null +++ b/pribor_prd_k_4.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-К 4" diff --git a/pribor_prd_n_1.tscn b/pribor_prd_n_1.tscn new file mode 100644 index 0000000..cc68167 --- /dev/null +++ b/pribor_prd_n_1.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-Н 1" diff --git a/pribor_prd_n_2.tscn b/pribor_prd_n_2.tscn new file mode 100644 index 0000000..4f8efdc --- /dev/null +++ b/pribor_prd_n_2.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-Н 2" diff --git a/pribor_prd_n_3.tscn b/pribor_prd_n_3.tscn new file mode 100644 index 0000000..157f5c9 --- /dev/null +++ b/pribor_prd_n_3.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-Н 3" diff --git a/pribor_prd_n_4.tscn b/pribor_prd_n_4.tscn new file mode 100644 index 0000000..3896f0a --- /dev/null +++ b/pribor_prd_n_4.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-Н 4" diff --git a/pribor_prd_v_1.tscn b/pribor_prd_v_1.tscn new file mode 100644 index 0000000..6f6c53b --- /dev/null +++ b/pribor_prd_v_1.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-В 1" diff --git a/pribor_prd_v_2.tscn b/pribor_prd_v_2.tscn new file mode 100644 index 0000000..50ec6b9 --- /dev/null +++ b/pribor_prd_v_2.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-В 2" diff --git a/pribor_prd_v_3.tscn b/pribor_prd_v_3.tscn new file mode 100644 index 0000000..54cf5a8 --- /dev/null +++ b/pribor_prd_v_3.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-В 3" diff --git a/pribor_prd_v_4.tscn b/pribor_prd_v_4.tscn new file mode 100644 index 0000000..6f6c53b --- /dev/null +++ b/pribor_prd_v_4.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора ПРД-В 1" diff --git a/pribor_rtr.tscn b/pribor_rtr.tscn new file mode 100644 index 0000000..368aea3 --- /dev/null +++ b/pribor_rtr.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора РТР" diff --git a/pribor_sch3.tscn b/pribor_sch3.tscn new file mode 100644 index 0000000..4a16ab1 --- /dev/null +++ b/pribor_sch3.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора Щ3" diff --git a/pribor_spt_l.tscn b/pribor_spt_l.tscn new file mode 100644 index 0000000..0c9066f --- /dev/null +++ b/pribor_spt_l.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора СПТ Левый" diff --git a/pribor_spt_r.tscn b/pribor_spt_r.tscn new file mode 100644 index 0000000..62c0337 --- /dev/null +++ b/pribor_spt_r.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора СПТ Правый" diff --git a/pribor_uf.tscn b/pribor_uf.tscn new file mode 100644 index 0000000..a00ecf8 --- /dev/null +++ b/pribor_uf.tscn @@ -0,0 +1,10 @@ +[gd_scene format=2] + +[node name="pribor_UF" type="Node2D"] + +[node name="test_label" type="Label" parent="."] +margin_left = 12.0 +margin_top = 8.0 +margin_right = 154.0 +margin_bottom = 22.0 +text = "Здесь будет схема прибора УФ" diff --git a/project.godot b/project.godot index f1112d0..b22348d 100644 --- a/project.godot +++ b/project.godot @@ -14,6 +14,10 @@ config/name="uarep-ctl" run/main_scene="res://Control.tscn" config/icon="res://data/icon.png" +[autoload] + +Consts="*res://consts.gd" + [display] window/size/width=1600 diff --git a/Контроль.gd b/Контроль.gd index c6e210a..9f43930 100644 --- a/Контроль.gd +++ b/Контроль.gd @@ -1,20 +1,42 @@ extends Panel -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - - # Called when the node enters the scene tree for the first time. func _ready(): - $pribor_UF.connect('button_up', self, 'on_pribor_press', ['111']) + $pribor_uf.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_UF]) + $pribor_rtr.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_RTR]) + $pribor_afsp_l.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_AFSP_L]) + $pribor_afsp_r.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_AFSP_R]) + $pribor_sch3.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_SCH3]) + $pribor_spt_l.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_SPT_L]) + $pribor_spt_r.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_SPT_R]) + $pribor_prd_v_1.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_V_1]) + $pribor_prd_n_1.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_N_1]) + $pribor_prd_k_1.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_K_1]) + $pribor_prd_v_2.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_V_2]) + $pribor_prd_n_2.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_N_2]) + $pribor_prd_k_2.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_K_2]) + $pribor_prd_v_3.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_V_3]) + $pribor_prd_n_3.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_N_3]) + $pribor_prd_k_3.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_K_3]) + $pribor_prd_v_4.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_V_4]) + $pribor_prd_n_4.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_N_4]) + $pribor_prd_k_4.connect('button_up', self, 'on_pribor_press', [Consts.PRIBOR_PRD_K_4]) -func on_pribor_press(text: String): - prints(text) + +func on_pribor_press(text): + clear_obj($scene) + var scen = load(text).instance() + $scene.add_child(scen) + - +func clear_obj(obj : Object): + var items = $scene.get_children() + for item in items: + $scene.remove_child(item) + item.free() + # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass