diff --git a/.gitignore b/.gitignore index d053cdac..f0b60c9e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,8 @@ mono_crash.*.json /html/ /commit.gd -.fuse_hidden* \ No newline at end of file +.fuse_hidden* +/bin/ + +# Godot 4+ specific ignores +.godot/ diff --git a/Control.tscn b/Control.tscn index 2f007987..4de0f179 100644 --- a/Control.tscn +++ b/Control.tscn @@ -1,48 +1,241 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=12 format=3 uid="uid://chdg6tfntuuxl"] -[ext_resource path="res://data/мп550-работа-эскиз.png" type="Texture" id=2] +[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/кнопка-помеха.tscn" id="1"] +[ext_resource type="Script" path="res://работа.gd" id="1_fdcfc"] +[ext_resource type="Texture2D" uid="uid://bq67yytxgoopq" path="res://data/мп550-работа-эскиз.png" id="2"] +[ext_resource type="PackedScene" uid="uid://bq7haw1ypiv48" path="res://scenes/рамка.tscn" id="3"] +[ext_resource type="Script" path="res://canvas.gd" id="4_qfshq"] +[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://shaders/shader_edu.tres" id="5"] +[ext_resource type="Texture2D" uid="uid://crenptexlkub0" path="res://data/решётка-антенная-0.png" id="5_bswj7"] +[ext_resource type="Texture2D" uid="uid://dmty3bpego2pi" path="res://data/направление-0.png" id="6_y7bht"] +[ext_resource type="Script" path="res://scenes/table.gd" id="9_2ld6k"] -[sub_resource type="DynamicFont" id=2] - -[sub_resource type="Theme" id=3] -resource_local_to_scene = true -default_font = SubResource( 2 ) - -[node name="TabContainer" type="TabContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -rect_pivot_offset = Vector2( 800, 600 ) -tab_align = 0 -__meta__ = { -"_edit_use_anchors_": true +[sub_resource type="Animation" id="Animation_hfqb8"] +resource_name = "ant_fwd" +length = 0.77 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ant_fwd:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.77), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [4.03171, 5.37561] } -[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 -theme = SubResource( 3 ) +[sub_resource type="AnimationLibrary" id="AnimationLibrary_4awq3"] +_data = { +"ant_fwd": SubResource("Animation_hfqb8") +} -[node name="Sprite" type="Sprite" parent="Работа"] -position = Vector2( 796, 576 ) -scale = Vector2( 1.00375, 0.973333 ) -texture = ExtResource( 2 ) +[node name="TabContainer" type="TabContainer"] +offset_top = 5.0 +offset_right = 1595.0 +offset_bottom = 1200.0 + +[node name="Работа" type="Panel" parent="."] +layout_mode = 2 +script = ExtResource("1_fdcfc") + +[node name="canvas" type="Sprite2D" parent="Работа"] +material = ExtResource("5") +position = Vector2(800, 592) +scale = Vector2(0.9975, 0.958333) +texture = ExtResource("2") +script = ExtResource("4_qfshq") +metadata/_edit_lock_ = true + +[node name="ant_grid" type="Sprite2D" parent="Работа/canvas"] +visible = false +position = Vector2(-209.524, 12.5219) +texture = ExtResource("5_bswj7") +metadata/_edit_lock_ = true + +[node name="ant_fwd" type="Sprite2D" parent="Работа/canvas/ant_grid"] +modulate = Color(1, 1, 1, 0.294118) +position = Vector2(0.012268, -0.00860885) +rotation = 4.08407 +texture = ExtResource("6_y7bht") +offset = Vector2(273.107, -0.597534) + +[node name="ant_bkwd" type="Sprite2D" parent="Работа/canvas/ant_grid"] +modulate = Color(1, 1, 1, 0.294118) +position = Vector2(0.012268, -0.00860885) +rotation = -4.38776 +texture = ExtResource("6_y7bht") +offset = Vector2(273.107, -0.597534) + +[node name="ant_left" type="Sprite2D" parent="Работа/canvas/ant_grid"] +modulate = Color(1, 1, 1, 0.294118) +position = Vector2(0.012268, -0.00860885) +rotation = -2.84314 +texture = ExtResource("6_y7bht") +offset = Vector2(273.107, -0.597534) + +[node name="ant_right" type="Sprite2D" parent="Работа/canvas/ant_grid"] +modulate = Color(1, 1, 1, 0.294118) +position = Vector2(0.012268, -0.00860885) +rotation = 0.10472 +texture = ExtResource("6_y7bht") +offset = Vector2(273.107, -0.597534) + +[node name="ant_dir" type="AnimationPlayer" parent="Работа/canvas/ant_grid"] +libraries = { +"": SubResource("AnimationLibrary_4awq3") +} + +[node name="ramka_pomeh" parent="Работа" instance=ExtResource("3")] +layout_mode = 0 +offset_left = 1180.0 +offset_top = 738.0 +offset_right = 1589.0 +offset_bottom = 1158.0 +text = "Режим помехи" + +[node name="btn_p1" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 10.0 +offset_top = 30.0 +offset_right = 100.0 +offset_bottom = 110.0 +text = "Откл" + +[node name="btn_p4" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 110.0 +offset_top = 320.0 +offset_right = 200.0 +offset_bottom = 410.0 +text = "13" + +[node name="btn_p5" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 10.0 +offset_top = 320.0 +offset_right = 100.0 +offset_bottom = 410.0 +text = "12" + +[node name="btn_p6" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 210.0 +offset_top = 220.0 +offset_right = 300.0 +offset_bottom = 310.0 +text = "10" + +[node name="btn_p7" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 310.0 +offset_top = 220.0 +offset_right = 399.0 +offset_bottom = 310.0 +text = "11" + +[node name="btn_p8" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 110.0 +offset_top = 220.0 +offset_right = 200.0 +offset_bottom = 310.0 +text = "9" + +[node name="btn_p9" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 10.0 +offset_top = 220.0 +offset_right = 100.0 +offset_bottom = 310.0 +text = "8" + +[node name="btn_p10" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 310.0 +offset_top = 120.0 +offset_right = 399.0 +offset_bottom = 210.0 +text = "7" + +[node name="btn_p11" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 310.0 +offset_top = 30.0 +offset_right = 399.0 +offset_bottom = 110.0 +text = "3" + +[node name="btn_p12" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 10.0 +offset_top = 120.0 +offset_right = 100.0 +offset_bottom = 210.0 +text = "4" + +[node name="btn_p13" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 110.0 +offset_top = 120.0 +offset_right = 200.0 +offset_bottom = 210.0 +text = "5" + +[node name="btn_p14" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 210.0 +offset_top = 120.0 +offset_right = 300.0 +offset_bottom = 210.0 +text = "6" + +[node name="btn_p15" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 210.0 +offset_top = 30.0 +offset_right = 300.0 +offset_bottom = 110.0 +text = "2" + +[node name="btn_p16" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 110.0 +offset_top = 30.0 +offset_right = 200.0 +offset_bottom = 110.0 +text = "1" + +[node name="btn_auto" parent="Работа/ramka_pomeh" instance=ExtResource("1")] +layout_mode = 0 +offset_left = 210.0 +offset_top = 320.0 +offset_right = 399.0 +offset_bottom = 410.0 +text = "Автоматически" + +[node name="ramka_celi" parent="Работа" instance=ExtResource("3")] +layout_mode = 0 +offset_left = 1180.0 +offset_top = 308.0 +offset_right = 1589.0 +offset_bottom = 728.0 +text = "Параметры цели" + +[node name="tbl_celi" type="GridContainer" parent="Работа/ramka_celi"] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.052 +anchor_right = 0.99 +anchor_bottom = 1.0 +offset_top = -1.84 +offset_right = 4.08997 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("9_2ld6k") [node name="Контроль" type="Panel" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 42.0 -margin_right = -4.0 -margin_bottom = -4.0 - -[node name="Button" type="Button" parent="Контроль"] -margin_left = 480.0 -margin_top = 440.0 -margin_right = 975.0 -margin_bottom = 620.0 -text = "ЖЫШЦЙБЮ" +visible = false +layout_mode = 2 diff --git a/canvas.gd b/canvas.gd new file mode 100644 index 00000000..003a3200 --- /dev/null +++ b/canvas.gd @@ -0,0 +1,14 @@ +@tool +extends Sprite2D + +# const band_ants = [Vector4(8, 600, 650, 10), Vector4(8, 650, 700, 30), Vector4(12, 750, 800, 50)] +var band_ants: PackedInt32Array = PackedInt32Array([8, 8, 12]) + +# Called when the node enters the scene tree for the first time. +func _ready(): + material.set_shader_parameter('band_ants', band_ants) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass diff --git a/data/DejaVuSans.ttf.import b/data/DejaVuSans.ttf.import new file mode 100644 index 00000000..3e412bcd --- /dev/null +++ b/data/DejaVuSans.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://c6p8thias0vuy" +path="res://.godot/imported/DejaVuSans.ttf-b4085dde282b5d503d6a56e258b526b7.fontdata" + +[deps] + +source_file="res://data/DejaVuSans.ttf" +dest_files=["res://.godot/imported/DejaVuSans.ttf-b4085dde282b5d503d6a56e258b526b7.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/data/DejaVuSansCondensed.ttf.import b/data/DejaVuSansCondensed.ttf.import new file mode 100644 index 00000000..42c3c526 --- /dev/null +++ b/data/DejaVuSansCondensed.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://c7hvei2ks7jp6" +path="res://.godot/imported/DejaVuSansCondensed.ttf-7a8251b7291db131ffa4eaba367ef066.fontdata" + +[deps] + +source_file="res://data/DejaVuSansCondensed.ttf" +dest_files=["res://.godot/imported/DejaVuSansCondensed.ttf-7a8251b7291db131ffa4eaba367ef066.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/data/arrow-ninepatch-0.png b/data/arrow-ninepatch-0.png new file mode 100644 index 00000000..3a5b1ac6 Binary files /dev/null and b/data/arrow-ninepatch-0.png differ diff --git a/data/arrow-ninepatch-0.png.import b/data/arrow-ninepatch-0.png.import new file mode 100644 index 00000000..81a3371f --- /dev/null +++ b/data/arrow-ninepatch-0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c4erjbms6c1em" +path="res://.godot/imported/arrow-ninepatch-0.png-dfdc5d78f833b20c0b46412eab73b9fe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/arrow-ninepatch-0.png" +dest_files=["res://.godot/imported/arrow-ninepatch-0.png-dfdc5d78f833b20c0b46412eab73b9fe.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/free-drone-icon-58.png.import b/data/free-drone-icon-58.png.import index 2c0d261d..ae48bb75 100644 --- a/data/free-drone-icon-58.png.import +++ b/data/free-drone-icon-58.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/free-drone-icon-58.png-5b694998d3a27f8f0eac6f506f299266.stex" +type="CompressedTexture2D" +uid="uid://buod8b700wu4h" +path="res://.godot/imported/free-drone-icon-58.png-5b694998d3a27f8f0eac6f506f299266.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/free-drone-icon-58.png" -dest_files=[ "res://.import/free-drone-icon-58.png-5b694998d3a27f8f0eac6f506f299266.stex" ] +dest_files=["res://.godot/imported/free-drone-icon-58.png-5b694998d3a27f8f0eac6f506f299266.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/icon.png.import b/data/icon.png.import index 4fdfd86a..44e90e66 100644 --- a/data/icon.png.import +++ b/data/icon.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/icon.png-881386d1eb9605176a20d6b8bb875b0d.stex" +type="CompressedTexture2D" +uid="uid://5hegds324wsy" +path="res://.godot/imported/icon.png-881386d1eb9605176a20d6b8bb875b0d.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/icon.png" -dest_files=[ "res://.import/icon.png-881386d1eb9605176a20d6b8bb875b0d.stex" ] +dest_files=["res://.godot/imported/icon.png-881386d1eb9605176a20d6b8bb875b0d.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/main-font.tres b/data/main-font.tres index b68e8df9..f75961c1 100644 --- a/data/main-font.tres +++ b/data/main-font.tres @@ -1,11 +1,9 @@ -[gd_resource type="DynamicFont" load_steps=2 format=2] +[gd_resource type="FontFile" load_steps=2 format=2] -[ext_resource path="res://data/DejaVuSansCondensed.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://data/DejaVuSansCondensed.ttf" type="FontFile" id=1] [resource] size = 20 -outline_size = 1 -outline_color = Color( 0, 0, 0, 1 ) use_mipmaps = true use_filter = true font_data = ExtResource( 1 ) diff --git a/data/Грани22.png.import b/data/Грани22.png.import index 95497094..2724d753 100644 --- a/data/Грани22.png.import +++ b/data/Грани22.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/Грани22.png-493da837cf4c5e4bcc358b597e0bef6b.stex" +type="CompressedTexture2D" +uid="uid://b4isaggma6q3" +path="res://.godot/imported/Грани22.png-493da837cf4c5e4bcc358b597e0bef6b.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/Грани22.png" -dest_files=[ "res://.import/Грани22.png-493da837cf4c5e4bcc358b597e0bef6b.stex" ] +dest_files=["res://.godot/imported/Грани22.png-493da837cf4c5e4bcc358b597e0bef6b.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/Изделие МП-550.png.import b/data/Изделие МП-550.png.import index 60c3eea4..f2eef54e 100644 --- a/data/Изделие МП-550.png.import +++ b/data/Изделие МП-550.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/Изделие МП-550.png-aa08827e688aa0a8c85fe1ebf96c39ec.stex" +type="CompressedTexture2D" +uid="uid://62d43kud05ru" +path="res://.godot/imported/Изделие МП-550.png-aa08827e688aa0a8c85fe1ebf96c39ec.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/Изделие МП-550.png" -dest_files=[ "res://.import/Изделие МП-550.png-aa08827e688aa0a8c85fe1ebf96c39ec.stex" ] +dest_files=["res://.godot/imported/Изделие МП-550.png-aa08827e688aa0a8c85fe1ebf96c39ec.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/П16.png.import b/data/П16.png.import index 648a1fcf..8d55f4d3 100644 --- a/data/П16.png.import +++ b/data/П16.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/П16.png-bf31d24368470afda2405017885d019f.stex" +type="CompressedTexture2D" +uid="uid://dbok5t6buxb6q" +path="res://.godot/imported/П16.png-bf31d24368470afda2405017885d019f.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/П16.png" -dest_files=[ "res://.import/П16.png-bf31d24368470afda2405017885d019f.stex" ] +dest_files=["res://.godot/imported/П16.png-bf31d24368470afda2405017885d019f.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/ПРД.png.import b/data/ПРД.png.import index 329bf5d3..3bb89a3c 100644 --- a/data/ПРД.png.import +++ b/data/ПРД.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/ПРД.png-0583ee2ff33bda5b96809f18eb4b6d3c.stex" +type="CompressedTexture2D" +uid="uid://bos68thpqqvn" +path="res://.godot/imported/ПРД.png-0583ee2ff33bda5b96809f18eb4b6d3c.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/ПРД.png" -dest_files=[ "res://.import/ПРД.png-0583ee2ff33bda5b96809f18eb4b6d3c.stex" ] +dest_files=["res://.godot/imported/ПРД.png-0583ee2ff33bda5b96809f18eb4b6d3c.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/СПТ.png.import b/data/СПТ.png.import index cecdc5f1..22b96ca6 100644 --- a/data/СПТ.png.import +++ b/data/СПТ.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/СПТ.png-8f936ad6e2c2488a3dc88469226a44c7.stex" +type="CompressedTexture2D" +uid="uid://dkqlvd750pplc" +path="res://.godot/imported/СПТ.png-8f936ad6e2c2488a3dc88469226a44c7.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/СПТ.png" -dest_files=[ "res://.import/СПТ.png-8f936ad6e2c2488a3dc88469226a44c7.stex" ] +dest_files=["res://.godot/imported/СПТ.png-8f936ad6e2c2488a3dc88469226a44c7.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/УФ.png.import b/data/УФ.png.import index fc8d21f7..e40f96a6 100644 --- a/data/УФ.png.import +++ b/data/УФ.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/УФ.png-1921501d9e9f088f15714b06ceba80a7.stex" +type="CompressedTexture2D" +uid="uid://bar8k5qef7kch" +path="res://.godot/imported/УФ.png-1921501d9e9f088f15714b06ceba80a7.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/УФ.png" -dest_files=[ "res://.import/УФ.png-1921501d9e9f088f15714b06ceba80a7.stex" ] +dest_files=["res://.godot/imported/УФ.png-1921501d9e9f088f15714b06ceba80a7.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/Щ3.png.import b/data/Щ3.png.import index 62021f10..3dbd717c 100644 --- a/data/Щ3.png.import +++ b/data/Щ3.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/Щ3.png-0dddb7358beb598783af26f75da91b9a.stex" +type="CompressedTexture2D" +uid="uid://d2jxmtd6n5jd1" +path="res://.godot/imported/Щ3.png-0dddb7358beb598783af26f75da91b9a.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/Щ3.png" -dest_files=[ "res://.import/Щ3.png-0dddb7358beb598783af26f75da91b9a.stex" ] +dest_files=["res://.godot/imported/Щ3.png-0dddb7358beb598783af26f75da91b9a.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/кнопка-квадрат-0.png b/data/кнопка-квадрат-0.png new file mode 100644 index 00000000..72b6a4cb Binary files /dev/null and b/data/кнопка-квадрат-0.png differ diff --git a/data/кнопка-квадрат-0.png.import b/data/кнопка-квадрат-0.png.import new file mode 100644 index 00000000..4d4ef376 --- /dev/null +++ b/data/кнопка-квадрат-0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ct0ajcwno03h7" +path="res://.godot/imported/кнопка-квадрат-0.png-c65fd339b861c421e0ef0290d2b279fa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/кнопка-квадрат-0.png" +dest_files=["res://.godot/imported/кнопка-квадрат-0.png-c65fd339b861c421e0ef0290d2b279fa.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/кнопка-квадрат-1.png b/data/кнопка-квадрат-1.png new file mode 100644 index 00000000..38fa9abf Binary files /dev/null and b/data/кнопка-квадрат-1.png differ diff --git a/data/кнопка-квадрат-1.png.import b/data/кнопка-квадрат-1.png.import new file mode 100644 index 00000000..2fa36e9c --- /dev/null +++ b/data/кнопка-квадрат-1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6p0ndxcng02k" +path="res://.godot/imported/кнопка-квадрат-1.png-3e8f354c4e789ff37e9c072bb90aa353.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/кнопка-квадрат-1.png" +dest_files=["res://.godot/imported/кнопка-квадрат-1.png-3e8f354c4e789ff37e9c072bb90aa353.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/кнопка-тс-авиа-0.png b/data/кнопка-тс-авиа-0.png new file mode 100644 index 00000000..5390b843 Binary files /dev/null and b/data/кнопка-тс-авиа-0.png differ diff --git a/data/кнопка-тс-авиа-0.png.import b/data/кнопка-тс-авиа-0.png.import new file mode 100644 index 00000000..8156a718 --- /dev/null +++ b/data/кнопка-тс-авиа-0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6j8n8tk4tlns" +path="res://.godot/imported/кнопка-тс-авиа-0.png-c29bcb7703fa5529c341ba411f1f99c1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/кнопка-тс-авиа-0.png" +dest_files=["res://.godot/imported/кнопка-тс-авиа-0.png-c29bcb7703fa5529c341ba411f1f99c1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/кнопка-тс-авиа-1.png b/data/кнопка-тс-авиа-1.png new file mode 100644 index 00000000..5560e10c Binary files /dev/null and b/data/кнопка-тс-авиа-1.png differ diff --git a/data/кнопка-тс-авиа-1.png.import b/data/кнопка-тс-авиа-1.png.import new file mode 100644 index 00000000..52398122 --- /dev/null +++ b/data/кнопка-тс-авиа-1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crkkkr55en03i" +path="res://.godot/imported/кнопка-тс-авиа-1.png-b7301c6375ea2ca6f1cc0b3a279d72ee.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/кнопка-тс-авиа-1.png" +dest_files=["res://.godot/imported/кнопка-тс-авиа-1.png-b7301c6375ea2ca6f1cc0b3a279d72ee.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/кнопка-флаг-0-9патч.png b/data/кнопка-флаг-0-9патч.png new file mode 100644 index 00000000..8c086fed Binary files /dev/null and b/data/кнопка-флаг-0-9патч.png differ diff --git a/data/кнопка-флаг-0-9патч.png.import b/data/кнопка-флаг-0-9патч.png.import new file mode 100644 index 00000000..7af78abd --- /dev/null +++ b/data/кнопка-флаг-0-9патч.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dh31axwlodnxm" +path="res://.godot/imported/кнопка-флаг-0-9патч.png-eb58b5c0624d69e24db83dad6287debd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/кнопка-флаг-0-9патч.png" +dest_files=["res://.godot/imported/кнопка-флаг-0-9патч.png-eb58b5c0624d69e24db83dad6287debd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/кнопка-флаг-1-9патч.png b/data/кнопка-флаг-1-9патч.png new file mode 100644 index 00000000..8db800e3 Binary files /dev/null and b/data/кнопка-флаг-1-9патч.png differ diff --git a/data/кнопка-флаг-1-9патч.png.import b/data/кнопка-флаг-1-9патч.png.import new file mode 100644 index 00000000..658ac154 --- /dev/null +++ b/data/кнопка-флаг-1-9патч.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b567pxd14287x" +path="res://.godot/imported/кнопка-флаг-1-9патч.png-95726d30c512e2b68120eaafb1e464c1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/кнопка-флаг-1-9патч.png" +dest_files=["res://.godot/imported/кнопка-флаг-1-9патч.png-95726d30c512e2b68120eaafb1e464c1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/мп550-работа-эскиз.png b/data/мп550-работа-эскиз.png index b63eb853..18e1faea 100644 Binary files a/data/мп550-работа-эскиз.png and b/data/мп550-работа-эскиз.png differ diff --git a/data/мп550-работа-эскиз.png.import b/data/мп550-работа-эскиз.png.import index 477752bd..f89954db 100644 --- a/data/мп550-работа-эскиз.png.import +++ b/data/мп550-работа-эскиз.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture" -path="res://.import/мп550-работа-эскиз.png-7af57230feae7557e482f8923843a550.stex" +type="CompressedTexture2D" +uid="uid://bq67yytxgoopq" +path="res://.godot/imported/мп550-работа-эскиз.png-7af57230feae7557e482f8923843a550.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,24 @@ metadata={ [deps] source_file="res://data/мп550-работа-эскиз.png" -dest_files=[ "res://.import/мп550-работа-эскиз.png-7af57230feae7557e482f8923843a550.stex" ] +dest_files=["res://.godot/imported/мп550-работа-эскиз.png-7af57230feae7557e482f8923843a550.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 +compress/hdr_compression=1 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" 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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/направление-0.png b/data/направление-0.png new file mode 100644 index 00000000..9eddab46 Binary files /dev/null and b/data/направление-0.png differ diff --git a/data/направление-0.png.import b/data/направление-0.png.import new file mode 100644 index 00000000..80266d2a --- /dev/null +++ b/data/направление-0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dmty3bpego2pi" +path="res://.godot/imported/направление-0.png-fc849e899c0233dae81bedbe745f6709.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/направление-0.png" +dest_files=["res://.godot/imported/направление-0.png-fc849e899c0233dae81bedbe745f6709.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/рамка-панели.png b/data/рамка-панели.png new file mode 100644 index 00000000..69f4c142 Binary files /dev/null and b/data/рамка-панели.png differ diff --git a/data/рамка-панели.png.import b/data/рамка-панели.png.import new file mode 100644 index 00000000..a108984d --- /dev/null +++ b/data/рамка-панели.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs6i1xwx0pmdk" +path="res://.godot/imported/рамка-панели.png-efb6e075afd66ec5ca5df8be21c3c59a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/рамка-панели.png" +dest_files=["res://.godot/imported/рамка-панели.png-efb6e075afd66ec5ca5df8be21c3c59a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/решётка-антенная-0.png b/data/решётка-антенная-0.png new file mode 100644 index 00000000..bc407125 Binary files /dev/null and b/data/решётка-антенная-0.png differ diff --git a/data/решётка-антенная-0.png.import b/data/решётка-антенная-0.png.import new file mode 100644 index 00000000..6b1f0c95 --- /dev/null +++ b/data/решётка-антенная-0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crenptexlkub0" +path="res://.godot/imported/решётка-антенная-0.png-ed5c9e425cc5f08883f3e7ed022f01dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/решётка-антенная-0.png" +dest_files=["res://.godot/imported/решётка-антенная-0.png-ed5c9e425cc5f08883f3e7ed022f01dd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/default_env.tres b/default_env.tres index 20207a4a..11a59350 100644 --- a/default_env.tres +++ b/default_env.tres @@ -1,7 +1,7 @@ -[gd_resource type="Environment" load_steps=2 format=2] +[gd_resource type="Environment" load_steps=2 format=3 uid="uid://bxd3ftmqis2y1"] -[sub_resource type="ProceduralSky" id=1] +[sub_resource type="Sky" id="1"] [resource] background_mode = 2 -background_sky = SubResource( 1 ) +sky = SubResource("1") diff --git a/project.godot b/project.godot index 3b58133b..0df07d09 100644 --- a/project.godot +++ b/project.godot @@ -6,29 +6,45 @@ ; [section] ; section goes between [] ; param=value ; assign values to parameters -config_version=4 +config_version=5 [application] config/name="uarep-ctl" run/main_scene="res://Control.tscn" +config/features=PackedStringArray("4.0") +run/low_processor_mode=true +boot_splash/show_image=false +boot_splash/fullsize=false +boot_splash/use_filter=false config/icon="res://data/icon.png" +run/delta_sync_after_draw=true [display] -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 -window/stretch/mode="viewport" -window/stretch/aspect="keep" +window/size/viewport_width=1600 +window/size/viewport_height=1200 +window/size/resizable=false +window/size/borderless=true +window/vsync/vsync_mode=false + +[editor_plugins] + +enabled=PackedStringArray() [gui] -common/drop_mouse_on_gui_input_disabled=true +common/text_edit_undo_stack_max_size=10 theme/custom_font="res://data/main-font.tres" +common/drop_mouse_on_gui_input_disabled=true + +[input_devices] + +buffering/agile_event_flushing=true + +[logging] + +file_logging/enable_file_logging=true [physics] @@ -36,4 +52,8 @@ common/enable_pause_aware_picking=true [rendering] -environment/default_environment="res://default_env.tres" +renderer/rendering_method="gl_compatibility" +environment/defaults/default_environment="res://default_env.tres" +quality/driver/fallback_to_gles2=true +quality/intended_usage/framebuffer_allocation.mobile=2 +quality/filters/msaa=1 diff --git a/scenes/nine-patch-button.gd b/scenes/nine-patch-button.gd new file mode 100644 index 00000000..73ff2c67 --- /dev/null +++ b/scenes/nine-patch-button.gd @@ -0,0 +1,35 @@ +@tool + +extends PanelContainer + +@export var text: String = '': get = get_text, set = set_text +@export var texture_state0: Texture2D = preload('res://data/кнопка-квадрат-0.png'): set = _state_set_texture +@export var texture_state1: Texture2D = preload('res://data/кнопка-квадрат-1.png'): set = _state_set_texture +@export var pressed: bool = false: get = is_pressed, set = set_pressed +@export var toggle_mode: bool = false: get = is_toggle_mode, set = set_toggle_mode + +func _state_set_texture(val: Texture2D): $state.set_texture(val) +func _state_get_texture(): return $state.get_texture() + +func set_text (val: String): $button.set_text(val) +func set_pressed (val: bool): $button.set_pressed(val) + + +func set_toggle_mode (val: bool): + if is_inside_tree(): + $button.set_toggle_mode(val) + + +func get_text(): return $button.get_text() +func is_pressed(): return $button.is_pressed() +func is_toggle_mode(): return $button.is_toggle_mode() + + + +func _on_button_toggled(val: bool): + if val: $state.set_texture(texture_state1) + else: $state.set_texture(texture_state0) + + +func button_connect(button_signal: String, proc: Callable): + $button.connect(button_signal, proc) diff --git a/scenes/node.tscn b/scenes/node.tscn new file mode 100644 index 00000000..2b1843fd --- /dev/null +++ b/scenes/node.tscn @@ -0,0 +1,4 @@ +[gd_scene format=3 uid="uid://fp6utm5jmlj2"] + +[node name="Label" type="Label"] +clip_text = true diff --git a/scenes/selector.tscn b/scenes/selector.tscn new file mode 100644 index 00000000..dfbfcca3 --- /dev/null +++ b/scenes/selector.tscn @@ -0,0 +1,10 @@ +[gd_scene format=3 uid="uid://dhdiy3lgtt8v3"] + +[node name="NinePatchRect" type="NinePatchRect"] +draw_center = false +patch_margin_left = 8 +patch_margin_top = 8 +patch_margin_right = 8 +patch_margin_bottom = 8 +axis_stretch_horizontal = 1 +axis_stretch_vertical = 1 diff --git a/scenes/table.gd b/scenes/table.gd new file mode 100644 index 00000000..2e26523d --- /dev/null +++ b/scenes/table.gd @@ -0,0 +1,509 @@ +extends GridContainer + +@export var _selector_color: Color = Color(1.0, 1.0, 1.0, 1.0) +@export_file ('*.tscn') var node_type_file: String = 'res://scenes/node.tscn' +@export_file ('*.tscn') var selector_type_file: String = 'res://scenes/selector.tscn' + +const MAX_INDEX = 99 # Максимальное значение индекса для колонки и строки. Связано с форматом индекса ключа +const INDEX_FORMAT = '%02d_%02d' # Формат индекса +const NODE_PREFIX = 'NODE_' # Префикс ключа ячейки таблицы +const HEAD_PREFIX = 'HEAD_' # Префикс ключа заголовка таблицы +const DATA_PREFIX = 'DATA_' # Префикс ключа данных ячейки таблицы +const CONN_PREFIX = 'CONN_' # Префикс ключа обработчиков событий ячейки таблицы +const SLCT_PREFIX = 'SLCT_' # Префикс ключа индикатора выбранного ряда таблицы + +const NODE_KEY_FORMAT = NODE_PREFIX + INDEX_FORMAT +const HEAD_KEY_FORMAT = HEAD_PREFIX + INDEX_FORMAT +const DATA_KEY_FORMAT = DATA_PREFIX + INDEX_FORMAT +const CONNECTED_KEY_FORMAT = CONN_PREFIX + INDEX_FORMAT +const ROW_SELECTOR_KEY_FORMAT = SLCT_PREFIX + INDEX_FORMAT + +const SLCT_KEY_UP = KEY_UP # Клавиша уменьшения индекса выбранного ряда +const SLCT_KEY_DOWN = KEY_DOWN # Клавиша увеличения индекса выбранного ряда + +var nodes: = {} # Все ячейки таблицы и дополнительные элементы +var selector_color_proc: Callable # Ссылка на процедуру генератора цвета индикатора выбранного ряда +var selector_size_proc: Callable # Ссылка на процедуру генератора размера индикатора выбранного ряда +var ScnSelector: PackedScene # Прототип индикатора выбранного ряда +var ScnNode: PackedScene # Прототип ячейки таблицы +var in_focus: = false # Фокус пользовательского ввода +var header: GridContainer # Заголовок таблицы + +signal row_pressed(i_row) # Вызывается при нажатии кнопкой мыши на строку +signal selected_changed(i_row) # Вызывается при изменении выбранного ряда. i_row - текущий выбранный ряд + + +func selector_up(): + var i_rows: = [] + get_selected_rows(i_rows) + for i in i_rows: + set_row_selected(i, false) + var rows_count: = get_rows_count() + if not (i_rows.size() and (rows_count > 1)): + return + var i_row = i_rows[0] + i_row -= 1 + if i_row < 0: + i_row = rows_count - 1 + set_row_selected(i_row, true) + emit_signal('selected_changed', i_row) + + +func selector_down(): + var i_rows: = [] + get_selected_rows(i_rows) + for i in i_rows: + set_row_selected(i, false) + var rows_count: = get_rows_count() + if not (i_rows.size() and (rows_count > 1)): + return + var i_row = i_rows[0] + i_row += 1 + i_row %= rows_count + set_row_selected(i_row, true) + emit_signal('selected_changed', i_row) + + +func set_columns_alignments(alignments): + assert(columns == alignments.size()) + var rows_count: = get_rows_count() + for i_row in rows_count: + for i_col in alignments.size(): + set_node_alligment(i_col, i_row, alignments[i_col]) + + +func _ready(): + ScnSelector = load(selector_type_file) + ScnNode = load(node_type_file) + assert(ScnSelector) + assert(ScnNode) + + +func align_to_left_bottom(header, gap: = Vector2(0, 0)): + """ Выравнивает по нижнему левому углу. Используется для выравнивания по заголовку """ + position.x = header.position.x + gap.x + position.y = header.position.y + header.rect_size.y + gap.y + + +func _assert_meta(i_col: int, i_row: int, pname: String, node): + assert(node.has_meta(pname), 'ошибка: нет мета-свойства \"%s\" у ячейки (%s): колонка:%d ряд:%d' % [pname, typeof(node), i_col, i_row]) + + +func set_node_meta(i_col: int, i_row: int, pname: String, val) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var node = nodes[key] + node.set_meta(pname, val) + + +func get_node_meta(i_col: int, i_row: int, pname: String): + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var node = nodes[key] + _assert_meta(i_col, i_row, pname, node) + return node.get_meta(pname) + + +func set_node_property(i_col: int, i_row: int, pname: String, val) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var node = nodes[key] + node.set(pname, val) + + +func get_node_property(i_col: int, i_row: int, pname: String): + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var node = nodes[key] + return node.get(pname) + + +func get_node_key(format: String, i_col: int, i_row: int) -> String: + var key: String = format % [i_row, i_col] + assert(nodes.has(key), 'ошибка: нет такой ячейки: колонка:%d ряд:%d' % [i_col, i_row]) + return key + + +func get_key_indexes(key: String) -> Array: + var tokens: = key.split('_') + assert(tokens.size() == 3, 'ошибка: неверный ключ: \"%s\"' % key) + return [int(tokens[2]), int(tokens[1])] + + +func set_columns_min_size(sizes: Array) -> void: + var rows_count: = get_rows_count() + for i_row in rows_count: + set_nodes_min_size(i_row, sizes) + set_nodes_min_size(0, sizes, HEAD_KEY_FORMAT) + + +func set_columns_aligment(alignments: Array) -> void: + var rows_count: = get_rows_count() + for i_row in rows_count: + for i_col in alignments.size(): + set_node_alligment(i_col, i_row, alignments[i_col]) + + +func _input(event) -> void: + if event is InputEventKey: + if in_focus and event.pressed: + if event.scancode == SLCT_KEY_UP: + selector_up() + elif event.scancode == SLCT_KEY_DOWN: + selector_down() + elif event is InputEventMouseButton: + if not event.pressed: + return + if (event.position.x < position.x) \ + or (event.position.x > (position.x + size.x)) \ + or (event.position.y < position.y) \ + or (event.position.y > (position.y + size.y)): + in_focus = false + emit_signal('focus_exited') + return + var rows_count: = get_rows_count() + in_focus = true + emit_signal('focus_entered') + for i_row in rows_count: + var rect = [0, 0, 0, 0] + get_node_rect(0, i_row, rect) + var y = rect[1] + position.y + if event.position.y < y: + continue + if event.position.y > (y + rect[3]): + continue + emit_signal('row_pressed', i_row) + break + + +func _init() -> void: + selector_color_proc = Callable(self, 'default_selector_color_proc') + assert(selector_color_proc.is_valid()) + selector_size_proc = Callable(self, 'default_selector_size_proc') + assert(selector_size_proc.is_valid()) + + +func default_selector_color_proc(i_row: int): + return _selector_color + + +func set_selector_color_proc(instance: Object, function: String) -> void: + selector_color_proc = Callable(instance, function) + assert(selector_color_proc.is_valid()) + + +func set_selector_size_proc(instance: Object, function: String) -> void: + selector_size_proc = Callable(instance, function) + assert(selector_size_proc.is_valid()) + + +func default_selector_size_proc(i_row: int, rect: Array) -> void: + get_node_rect(0, i_row, rect) + rect[0] = rect[0] + position.x - 1 + rect[1] = rect[1] + position.y - 4 + rect[2] = size.x + 2 + rect[3] = rect[3] + 8 + + +func clear_rows_selected(): + var rows_count: = get_rows_count() + for i_row in rows_count: + set_row_selected(i_row, false) + + +func set_row_selected(i_row: int, selected: bool = true) -> void: + var key: = ROW_SELECTOR_KEY_FORMAT % [i_row, 0] + var parent = get_parent() + if nodes.has(key) and (not selected): + var selector = nodes[key] + parent.remove_child(selector) + selector.queue_free() + nodes.erase(key) + elif (not nodes.has(key)) and selected: + var selector = ScnSelector.instantiate() + var rect: = [0, 0, 0, 0] + selector_size_proc.call(i_row, rect) + selector.rect_position.x = rect[0] + selector.rect_position.y = rect[1] + selector.rect_size.x = rect[2] + selector.rect_size.y = rect[3] + selector.modulate = selector_color_proc.call(i_row) + nodes[key] = selector + parent.add_child(selector) + + +func is_row_selected(i_row: int) -> bool: + var key: = get_node_key(ROW_SELECTOR_KEY_FORMAT, 0, i_row) + return nodes.has(key) + + +func get_selected_rows(rows: Array) -> void: + for key in nodes.keys(): + if SLCT_PREFIX in key: + var indexes = get_key_indexes(key) + rows.append(indexes[1]) + + +func get_rows_count() -> int: + var rows_count: int = 0 + for key in nodes: + rows_count += int(NODE_PREFIX in key) + return rows_count / columns + + +func get_node2(i_col: int, i_row: int) -> Node: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + return nodes[key] + + +func set_node_user_data(i_col: int, i_row: int, user_data: Object) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[key] = user_data + + +func add_row(row_types: Array) -> void: + assert(row_types.size() < MAX_INDEX, 'ошибка: слишком много колонок, больше %d' % (MAX_INDEX + 1)) + if columns == 1: + set_columns(row_types.size()) + else: + assert(columns == row_types.size(), 'ошибка: %s количество колонок установлено ранее - %d, но требуется %d' % [self, columns, row_types.size()]) + var rows_count: int = get_rows_count() + assert(rows_count < MAX_INDEX, 'ошибка: слишком много рядов, больше %d' % (MAX_INDEX + 1)) + for i_col in columns: + var node = row_types[i_col].instantiate() + var key: String = NODE_KEY_FORMAT % [rows_count, i_col] + node.name = key + add_child(node) + nodes[key] = node + + +func set_header(header_types: Array): + assert(header_types.size() < MAX_INDEX, 'ошибка: слишком много колонок, больше %d' % (MAX_INDEX + 1)) + if columns == 1: + set_columns(header_types.size()) + else: + assert(columns == header_types.size()) + var do_adj: = false + if not header: + header = GridContainer.new() + header.position = position + header.columns = header_types.size() + header.size.x = size.x + var parent = get_parent() + parent.add_child(header) + do_adj = true + else: + var nodes = header.get_children() + for node in nodes: + nodes.erase(node.name) + header.remove_child(node) + node.queue_free() + for i_col in columns: + var node = header_types[i_col].instantiate() + var key: String = HEAD_KEY_FORMAT % [0, i_col] + node.name = key + nodes[key] = node + header.add_child(node) + if do_adj: + var rect = [0, 0, 0, 0] + get_node_rect(0, 0, rect, HEAD_KEY_FORMAT) + position.y += rect[3] + + +func set_header_text(headers: Array): + assert(columns == headers.size()) + set_row_text(0, headers, 0, HEAD_KEY_FORMAT) + + +func get_node_user_data(i_col: int, i_row: int) -> Object: + var key: = get_node_key(DATA_KEY_FORMAT, i_col, i_row) + return nodes[key] + + +func remove_row(i_row: int): + var sel_key: String = ROW_SELECTOR_KEY_FORMAT % [i_row, 0] + if nodes.has(sel_key): + var selector = nodes[sel_key] + get_parent().remove_child(selector) + selector.queue_free() + nodes.erase(sel_key) + for i_col in columns: + var node_key: String = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var conn_key: String = CONNECTED_KEY_FORMAT % [i_row, i_col] + var data_key: String = DATA_KEY_FORMAT % [i_row, i_col] + var node = nodes[node_key] + nodes.erase(node_key) + remove_child(node) + node.queue_free() + + if nodes.has(data_key): + nodes.erase(data_key) + if nodes.has(conn_key): + var conn = nodes[conn_key] + var callback = conn[0] + var dest_node = conn[1] + node.disconnect('pressed', dest_node, callback) + nodes.erase(conn_key) + + +func rehash(swaps: Array): + """ Переназначает ключи в соответствии с размерами таблицы. + После вызова swaps содержит массив пар [<прежний ключ>, <текущий ключ>] """ + assert(not swaps.size(), 'ошибка: swaps не пустой') + var nodes_copy: = {} + var i_col: = 0 + var i_row: = 0 + for key0 in nodes: + if NODE_PREFIX in key0: + var node_key1: String = NODE_KEY_FORMAT % [i_row, i_col] + nodes_copy[node_key1] = nodes[key0] + swaps.append([key0, node_key1]) + + var indxs = get_key_indexes(key0) + + var slct_key0: String = ROW_SELECTOR_KEY_FORMAT % [indxs[1], indxs[0]] + if nodes.has(slct_key0): + var slct_key1: String = ROW_SELECTOR_KEY_FORMAT % [i_row, i_col] + nodes_copy[slct_key1] = nodes[slct_key0] + swaps.append([slct_key0, slct_key1]) + + var conn_key0: String = CONNECTED_KEY_FORMAT % [indxs[1], indxs[0]] + if nodes.has(conn_key0): + var conn_key1: String = CONNECTED_KEY_FORMAT % [i_row, i_col] + nodes_copy[conn_key1] = nodes[conn_key0] + swaps.append([conn_key0, conn_key1]) + + var data_key0: String = DATA_KEY_FORMAT % [indxs[1], indxs[0]] + if nodes.has(data_key0): + var data_key1: String = DATA_KEY_FORMAT % [i_row, i_col] + nodes_copy[data_key1] = nodes[data_key0] + swaps.append([data_key0, data_key1]) + + i_col += 1 + if i_col == columns: + i_col = 0 + i_row += 1 + nodes.clear() + nodes.merge(nodes_copy) + + +func clear_rows() -> void: + """ Удаляет все строки таблицы """ + var rows_count: int = get_rows_count() + for i_row in rows_count: + remove_row(i_row) + + +func set_callbacks(dest_node: Node, event_name: String, callback: String, clmns: Array, user_data: Array) -> void: + """ Настраивает обратные вызовы для колонок. + :dest_node: Получатель события + :event_name: Имя события + :callback: Имя функции получателя события + :clmns: Индексы колонок + :user_data: Аргументы функции получателя события """ + var rows_count = get_rows_count() + for i_row in rows_count: + for i_col in clmns: + assert(i_col >= 0 and i_col < columns, 'ошибка: нет колонки %d' % i_col) + var node_key: String = NODE_KEY_FORMAT % [i_row, i_col] + var conn_key: String = CONNECTED_KEY_FORMAT % [i_row, i_col] + var node = nodes[node_key] + if nodes.has(conn_key): + var conn = nodes[conn_key] + var prev_callback = conn[0] + var prev_dest_node = conn[1] + node.disconnect(event_name, prev_dest_node, prev_callback) + assert (OK == node.connect(event_name, dest_node, callback, [node] + user_data)) + nodes[conn_key] = [callback, dest_node] + + +func set_rows_text(rows: Array) -> void: + for i_row in rows.size(): + for i_col in columns: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var node = nodes[key] + node.text = rows[i_row][i_col] + + +func set_nodes_min_size(i_row: int, sizes: Array, key_format: String = NODE_KEY_FORMAT) -> void: + for i_col in columns: + var key: = get_node_key(key_format, i_col, i_row) + var node = nodes[key] + node.size.x = sizes[i_col] + + +func set_node_text(i_col: int, i_row: int, val: String) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[key].text = val + + +func set_rows_state(rows: Array) -> void: + for i_row in rows.size(): + for i_col in columns: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[name].pressed = rows[i_row][i_col] + + +func set_node_state(i_col: int, i_row: int, val: bool) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[key].pressed = val + + +func set_node_frame(i_col: int, i_row: int, name: String, val: int) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + var node = nodes[key] + var sprite = node.get_node(name) + sprite.frame = val + + +func set_node_editable(i_col: int, i_row: int, val: bool) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[key].editable = val + + +func set_node_alligment(i_col: int, i_row: int, val: int) -> void: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[key].align = val + + +func set_row_alligments(i_row: int, aligns: Array) -> void: + for i_col in columns: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + nodes[key].align = aligns[i_col] + + +func get_row_text(i_row: int) -> Array: + var row: = [] + for i_col in columns: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + row.append(nodes[key].text) + return row + + +func set_row_text(i_row: int, row: Array, i_begin: int = 0, key_format: String = NODE_KEY_FORMAT) -> void: + for i_col in row.size(): + var key: = get_node_key(key_format, i_col, i_row) + nodes[key].text = row[i_col] + + +func get_rows_text() -> Array: + var rows_count: = get_rows_count() + var rows: = [] + for i_row in rows_count: + var row = get_row_text(i_row) + rows.append(row) + return rows + + +func get_row(i_row: int) -> Array: + var row: = [] + for i_col in columns: + var key: = get_node_key(NODE_KEY_FORMAT, i_col, i_row) + row.append(nodes[key]) + return row + + +func get_node_rect(i_col: int, i_row: int, rect: Array, key_format: String = NODE_KEY_FORMAT) -> void: + assert(rect.size() >= 4, 'ошибка: мало элементов для возврата результата') + var key: = get_node_key(key_format, i_col, i_row) + var cell = nodes[key] + rect[0] = cell.position.x + rect[1] = cell.position.y + rect[2] = cell.size.x + rect[3] = cell.size.y diff --git a/scenes/кнопка-помеха.tscn b/scenes/кнопка-помеха.tscn new file mode 100644 index 00000000..1b01bbb4 --- /dev/null +++ b/scenes/кнопка-помеха.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=9 format=3 uid="uid://da7w3vkhadfwe"] + +[ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="1"] +[ext_resource type="Script" path="res://scenes/nine-patch-button.gd" id="2"] + +[sub_resource type="StyleBoxEmpty" id="1"] + +[sub_resource type="StyleBoxEmpty" id="6"] + +[sub_resource type="StyleBoxEmpty" id="2"] + +[sub_resource type="StyleBoxEmpty" id="3"] + +[sub_resource type="StyleBoxEmpty" id="5"] + +[sub_resource type="StyleBoxEmpty" id="4"] + +[node name="container" type="PanelContainer"] +offset_right = 30.0 +offset_bottom = 30.0 +theme_override_styles/panel = SubResource("1") +script = ExtResource("2") +toggle_mode = true + +[node name="state" type="NinePatchRect" parent="."] +show_behind_parent = true +layout_mode = 2 +texture = ExtResource("1") +patch_margin_left = 10 +patch_margin_top = 10 +patch_margin_right = 10 +patch_margin_bottom = 10 +axis_stretch_horizontal = 1 +axis_stretch_vertical = 1 + +[node name="button" type="Button" parent="."] +layout_mode = 2 +theme_override_styles/normal = SubResource("6") +theme_override_styles/hover = SubResource("2") +theme_override_styles/pressed = SubResource("3") +theme_override_styles/disabled = SubResource("5") +theme_override_styles/focus = SubResource("4") +toggle_mode = true +clip_text = true + +[node name="label" type="Label" parent="."] +layout_mode = 2 + +[connection signal="toggled" from="button" to="." method="_on_button_toggled"] diff --git a/scenes/рамка.gd b/scenes/рамка.gd new file mode 100644 index 00000000..32319695 --- /dev/null +++ b/scenes/рамка.gd @@ -0,0 +1,18 @@ +@tool + +extends NinePatchRect + + +@export var horizontal_alignment: HorizontalAlignment = HorizontalAlignment.HORIZONTAL_ALIGNMENT_CENTER: + get: return $header.horizontal_alignment + set(align): $header.horizontal_alignment = align + + +@export var vertical_alignment: VerticalAlignment = VerticalAlignment.VERTICAL_ALIGNMENT_CENTER: + get: return $header.vertical_alignment + set(align): $header.vertical_alignment = align + + +@export var text: String = 'caption text': + get: return $header.text + set(text): $header.text = text diff --git a/scenes/рамка.tscn b/scenes/рамка.tscn new file mode 100644 index 00000000..5f8cf3c5 --- /dev/null +++ b/scenes/рамка.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=3 format=3 uid="uid://bq7haw1ypiv48"] + +[ext_resource type="Script" path="res://scenes/рамка.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="2"] + +[node name="ramka" type="NinePatchRect"] +offset_right = 150.0 +offset_bottom = 100.0 +texture = ExtResource("2") +patch_margin_left = 15 +patch_margin_top = 30 +patch_margin_right = 15 +patch_margin_bottom = 10 +script = ExtResource("1") + +[node name="header" type="Label" parent="."] +clip_contents = true +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 22.0 +grow_horizontal = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +text = "caption text" +horizontal_alignment = 1 +vertical_alignment = 1 diff --git a/scenes/ячейка-1.tscn b/scenes/ячейка-1.tscn new file mode 100644 index 00000000..0762438c --- /dev/null +++ b/scenes/ячейка-1.tscn @@ -0,0 +1,8 @@ +[gd_scene format=2] + +[node name="Label" type="Label"] +margin_right = 122.0 +margin_bottom = 34.0 +custom_colors/font_color = Color( 1, 0.596078, 0.4, 1 ) +valign = 1 +clip_text = true diff --git a/shaders/shader_edu.tres b/shaders/shader_edu.tres new file mode 100644 index 00000000..888725a6 --- /dev/null +++ b/shaders/shader_edu.tres @@ -0,0 +1,338 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://s6xe8igevnv2"] + +[sub_resource type="Shader" id="1"] +code = "shader_type canvas_item; + +const float M_PI = 3.141592653589793; +/*const vec3 blue1 = vec3(0.42, 0.51, 0.55); +const vec3 blue2 = vec3(0.11, 0.21, 0.25); +const vec3 blue3 = vec3(0.35, 0.76, 0.83); +const vec3 blue4 = vec3(0.953, 0.969, 0.89); +const vec3 red = vec3(1.00, 0.38, 0.227); + +uniform vec4 blue1: source_color = vec4(0.4, 0.3, 0.3, 1.0); +uniform vec4 blue2: source_color = vec4(0.6, 0.5, 0.5, 1.0); +uniform vec4 blue3: source_color = vec4(0.8, 0.7, 0.7, 1.0); +uniform vec4 blue4: source_color = vec4(1.0, 0.9, 0.9, 1.0); +uniform vec4 red: source_color = vec4(1.0, 0.5, 0.3, 1.0); */ + +uniform vec4 blue0: source_color = vec4(0.38, 0.47, 0.51, 1.0); +uniform vec4 blue1: source_color = vec4(0.39, 0.44, 0.50, 1.0); +uniform vec4 blue2: source_color = vec4(0.11, 0.21, 0.25, 1.0); +uniform vec4 blue3: source_color = vec4(0.35, 0.76, 0.83, 1.0); +uniform vec4 blue4: source_color = vec4(0.953, 0.969, 0.89, 1.0); +uniform vec4 red: source_color = vec4(1.00, 0.38, 0.227, 1.0); + +uniform float line_width = 2.0; +uniform float sec_forward = 180.0; +uniform float sec_back = 0.0; +uniform float sec_left = 90.0; +uniform float sec_right = 300.0; +uniform float d0 = 520.0; +uniform float d1 = 1120.0; +uniform float d2 = 1160.0; +uniform float d3 = 100.0; +uniform float d4 = 180.0; +uniform float d5 = 650.0; +uniform float d6 = 800.0; +uniform float d7 = 950.0; +uniform vec2 pc0 = vec2(0, 0); +uniform vec2 pc1 = vec2(0, 0); +uniform vec2 pc2 = vec2(0, 0); +uniform float ap_ant_w = 12.0; +uniform vec2 tr0 = vec2(0, 0); +uniform vec2 tr1 = vec2(0, 0); +uniform vec2 tr2 = vec2(0, 0); + +// Массивы не работают +// uniform int band_ants[3]; // количество антенн, радиус внутренний, радиус внешний, подстройка по углу + +float SMOOTH(float r, float R) +{ + return 1.0 - smoothstep(R - 1.0, R + 1.0, r); +} + + +float RANGE(float a, float b, float x) +{ + return step(a, x) * (1.0 - step(b, x)); +} + + +float RS(float a, float b, float x) +{ + return smoothstep(a - 1.0, a + 1.0, x) * (1.0 - smoothstep(b - 1.0, b + 1.0, x)); +} + + +vec2 modulate_move(float a, float b, float c, float d, float time) +{ + return vec2(a * cos(time) + b * cos(2.0 * time), c * sin(time) + d * sin(2.0 * time)); +} + + +vec3 radar_scan_line(vec2 uv, vec2 center, float time, float radius, vec3 color) +{ + //angle of the line + float theta0 = time * 90.0; + vec2 d = uv - center; + float r = sqrt(dot(d, d)); + if (r < radius) + { + //compute the distance to the line theta=theta0 + vec2 p = radius * vec2(cos(theta0 * M_PI / 180.0), - sin(theta0 * M_PI / 180.0)); + float l = length(d - p * clamp(dot(d, p) / dot(p, p), 0.0, 1.0)); + //compute gradient based on angle difference to theta0 + float theta = mod(180.0 * atan(d.y, d.x) / M_PI + theta0, 360.0); + float gradient = clamp(1.0 - theta / 90.0, 0.0, 1.0); + return color * SMOOTH(l, 1.0) + 0.5 * gradient * color; + } + else return vec3(0, 0, 0); +} + +void sector(inout vec3 c, vec2 uv, vec2 center, float a, float da, float r0, float r1, vec3 color) +{ + float l = distance(center, uv); + vec2 d = uv - center; + float sf = 500.0; + float theta = atan(d.x, d.y) * sf; + da /= 2.0; + float a0 = radians(a - da); + float a1 = radians(a + da); + float va = SMOOTH(a0 * sf, theta) - SMOOTH(a1 * sf, theta); + float vr = SMOOTH(r0, l) - SMOOTH(r1, l); + c += color * sqrt(va * vr); +} + + +void circle(inout vec3 c, vec2 uv, vec2 p0, float radius, float width, vec3 color) +{ + float r = length(uv - p0); + c += (SMOOTH(r - width / 2.0, radius) - SMOOTH(r + width / 2.0, radius)) * color; +} + + +float circle2(vec2 uv, vec2 center, float radius, float width, float opening) +{ + vec2 d = uv - center; + float r = sqrt(dot(d, d)); + d = normalize(d); + if (abs(d.y) > opening) + return SMOOTH(r - width / 2.0, radius) - SMOOTH(r + width / 2.0, radius); + else + return 0.0; +} + +float circle3(vec2 uv, vec2 center, float radius, float width) +{ + vec2 d = uv - center; + float r = sqrt(dot(d, d)); + d = normalize(d); + float theta = 180.0 * (atan(d.y, d.x) / M_PI); + return smoothstep(2.0, 2.1, abs(mod(theta + 2.0, 45.0) - 2.0)) + * mix(0.5, 1.0, step(45.0, abs(mod(theta, 180.0) - 90.0))) + * (SMOOTH(r - width / 2.0, radius) - SMOOTH(r + width / 2.0, radius)); +} + + +float triangles(vec2 uv, vec2 center, float radius) +{ + vec2 d = uv - center; + return RS(-8.0, 0.0, d.x - radius) * (1.0 - smoothstep(7.0 + d.x - radius, 9.0 + d.x - radius, abs(d.y))) + + RS( 0.0, 8.0, d.x + radius) * (1.0 - smoothstep(7.0 - d.x - radius, 9.0 - d.x - radius, abs(d.y))) + + RS(-8.0, 0.0, d.y - radius) * (1.0 - smoothstep(7.0 + d.y - radius, 9.0 + d.y - radius, abs(d.x))) + + RS( 0.0, 8.0, d.y + radius) * (1.0 - smoothstep(7.0 - d.y - radius, 9.0 - d.y - radius, abs(d.x))); +} + + +float _cross(vec2 uv, vec2 center, float radius) +{ + vec2 d = uv - center; + int x = int(d.x); + int y = int(d.y); + float r = sqrt(dot(d, d)); + if ((r < radius) && ((x == y) || (x == -y))) + return 1.0; + else return 0.0; +} + + +void cross_lines(inout vec3 color, vec2 uv, vec2 pc, float r0, float w, vec3 c) +{ + vec2 d = uv - pc; + int x = int(d.x); + int y = int(d.y); + float r = sqrt(dot(d, d)); + if ((r < r0) && ((x == y) || (x == -y))) + color += c; + color += vec3(0, 0, 0); +} + + +float dots(vec2 uv, vec2 center, float radius) +{ + vec2 d = uv - center; + float r = sqrt(dot(d, d)); + if (r <= 2.5) + return 1.0; + if ((r <= radius) && ((abs(d.y + 0.5) <= 1.0) && (mod(d.x + 1.0, 50.0) < 2.0))) + return 1.0; + else if ((abs(d.y + 0.5) <= 1.0) && (r >= 50.0) && (r < 115.0)) + return 0.5; + else + return 0.0; +} + + +void bip1(inout vec3 color, vec2 uv, vec2 center, float r, vec3 c, float a) +{ + color += c * SMOOTH(length(uv - center), r) * a; +} + + +float bip2(vec2 uv, float time, vec2 center) +{ + float r = length(uv - center); + float R = 8.0 + mod(87.0 * time, 80.0); + return (0.5 - 0.5 * cos(30.0 * time)) * SMOOTH(r, 5.0) + + SMOOTH(6.0, r) - SMOOTH(8.0, r) + + smoothstep(max(8.0, R - 20.0), R, r) - SMOOTH(R,r); +} + + +vec3 circle_h(inout vec3 c, vec2 uv, vec2 c0, float r, vec3 color) +{ + return 1.0 * color; +} + + +void antenas(inout vec3 c, vec2 uv, vec2 p0, int cnt, float r0, float r1, vec3 c0, vec3 c1, float a, float adj) +{ + float da = 180.0f / float(cnt); + c0 *= a; + c1 *= a; + for (int i = -cnt; i <= cnt; i ++) + { + float v = float(i & 1); + vec3 col = v * c0 + (1.0f - v) * c1; + sector(c, uv, p0, float(i) * da + adj, da, r0, r1, col); + } +} + + +void circle_thin(inout vec3 color, vec2 uv, vec2 p, float r, float w, vec3 c, float a) +{ + float d = distance(uv, p); + float v0 = r - w; + float v1 = r + w; + color += a * sqrt(smoothstep(v1, v0, d) * smoothstep(v0, v1, d) * c); +} + + +void line(inout vec3 color, vec2 uv, vec2 p0, vec2 p1, vec3 c, float a) +{ + vec2 d = uv - p0; + float radius = distance(p0, p1); + float r = sqrt(dot(d, d)); + float theta0 = acos(dot(normalize(p0), normalize(p1))); + vec2 p = radius * vec2(cos(theta0), -sin(theta0)); + float l = length(d - p * clamp(dot(d, p) / dot(p, p), 0.0, 1.0)); + color += c * SMOOTH(l, 1.0); +} + + +void line_r(inout vec3 color, vec2 uv, vec2 center, float theta0, float radius, vec3 c, float a) +{ + vec2 d = uv - center; + float r = sqrt(dot(d, d)); + vec2 p = radius * vec2(cos(theta0 * M_PI / 180.0), - sin(theta0 * M_PI / 180.0)); + float l = length(d - p * clamp(dot(d, p) / dot(p, p), 0.0, 1.0)); + color += c * SMOOTH(l, 1.0); +} + + +void fragment() +{ + ivec2 isz = textureSize(TEXTURE, 0); + vec2 uv = UV * vec2(float(isz.x), float(isz.y)); + vec3 rs = vec3(d2, d1, d0) / 2.0f; + COLOR = texture(TEXTURE, UV); + + // РТО + //circle_thin(COLOR.rgb, uv, pc0, d0 / 2.0, line_width, blue1.rgb, 1.0); + //circle_thin(COLOR.rgb, uv, pc0, d1 / 2.0, line_width, blue1.rgb, 1.0); + //circle_thin(COLOR.rgb, uv, pc0, d2 / 2.0, line_width, blue1.rgb, 1.0); + //circle_thin(COLOR.rgb, uv, pc0, d5 / 2.0, line_width, blue1.rgb, 0.5); + //circle_thin(COLOR.rgb, uv, pc0, d6 / 2.0, line_width, blue1.rgb, 0.5); + //circle_thin(COLOR.rgb, uv, pc0, d7 / 2.0, line_width, blue1.rgb, 0.5); + + //line_r(COLOR.rgb, uv, pc0, 45, 580, blue1.rgb, 1.0); + //line_r(COLOR.rgb, uv, pc0, 135, 580, blue1.rgb, 1.0); + //line_r(COLOR.rgb, uv, pc0, 225, 580, blue1.rgb, 1.0); + //line_r(COLOR.rgb, uv, pc0, 315, 580, blue1.rgb, 1.0); + + //sector(COLOR.rgb, uv, pc0, sec_forward, ap_ant_w, 280, 580, red.rgb); + //sector(COLOR.rgb, uv, pc0, sec_back, ap_ant_w, 280, 580, red.rgb); + //sector(COLOR.rgb, uv, pc0, sec_left, ap_ant_w, 280, 580, red.rgb); + //sector(COLOR.rgb, uv, pc0, sec_right, ap_ant_w, 280, 580, red.rgb); + + //antenas(COLOR.rgb, uv, pc0, ants_count, d6 / 2.0, d7 / 2.0, blue0.rgb, blue1.rgb, 0.3, 7.5); + antenas(COLOR.rgb, uv, pc0, 2, 220, 280, blue1.rgb, blue0.rgb, 0.4, 0); + antenas(COLOR.rgb, uv, pc0, 2, 280, 340, blue0.rgb, blue1.rgb, 0.4, 0); + antenas(COLOR.rgb, uv, pc0, 2, 340, 400, blue1.rgb, blue0.rgb, 0.4, 0); + antenas(COLOR.rgb, uv, pc0, 2, 400, 460, blue0.rgb, blue1.rgb, 0.4, 0); + antenas(COLOR.rgb, uv, pc0, 2, 460, 520, blue1.rgb, blue0.rgb, 0.4, 0); + antenas(COLOR.rgb, uv, pc0, 2, 520, 580, blue0.rgb, blue1.rgb, 0.4, 0); + + bip1(COLOR.rgb, uv, tr0, 13.0, blue1.rgb, 1.0); + bip1(COLOR.rgb, uv, tr1, 13.0, blue1.rgb, 1.0); + bip1(COLOR.rgb, uv, tr2, 13.0, blue1.rgb, 1.0); + + // Массивы не работают + //for (int i = 0; i < 3; i ++) + //{ + // int cnt = int(band_ants[i].x); + // float r0 = band_ants[i].y; + // float r1 = band_ants[i].z; + // float adj = band_ants[i].w; + // antenas(COLOR.rgb, uv, pc0, cnt, r0, r1, blue0.rgb, blue1.rgb, 0.3, adj); + //} + + // Качка + circle_thin(COLOR.rgb, uv, pc1, d4 / 2.0, line_width, blue1.rgb, 1.0); + line_r(COLOR.rgb, uv, pc1, 0, d4 / 2.0, blue1.rgb, 1.0); + line_r(COLOR.rgb, uv, pc1, 90, d4 / 2.0, blue1.rgb, 1.0); + line_r(COLOR.rgb, uv, pc1, 180, d4 / 2.0, blue1.rgb, 1.0); + line_r(COLOR.rgb, uv, pc1, 270, d4 / 2.0, blue1.rgb, 1.0); + bip1(COLOR.rgb, uv, pc2, 13.0, blue1.rgb, 1.0); +} +" + +[resource] +shader = SubResource("1") +shader_parameter/blue0 = Color(0.378, 0.4272, 0.45, 1) +shader_parameter/blue1 = Color(0.336, 0.3808, 0.4, 1) +shader_parameter/blue2 = Color(0.11, 0.21, 0.25, 1) +shader_parameter/blue3 = Color(0.35, 0.76, 0.83, 1) +shader_parameter/blue4 = Color(0.953, 0.969, 0.89, 1) +shader_parameter/red = Color(1, 0.38, 0.227, 1) +shader_parameter/line_width = 2.0 +shader_parameter/sec_forward = 0.0 +shader_parameter/sec_back = 90.0 +shader_parameter/sec_left = 180.0 +shader_parameter/sec_right = 270.0 +shader_parameter/d0 = 520.0 +shader_parameter/d1 = 1110.0 +shader_parameter/d2 = 1150.0 +shader_parameter/d3 = 100.0 +shader_parameter/d4 = 180.0 +shader_parameter/d5 = 650.0 +shader_parameter/d6 = 800.0 +shader_parameter/d7 = 950.0 +shader_parameter/pc0 = Vector2(600, 600) +shader_parameter/pc1 = Vector2(120, 1090) +shader_parameter/pc2 = Vector2(90, 1110) +shader_parameter/ap_ant_w = 12.0 +shader_parameter/tr0 = Vector2(300, 400) +shader_parameter/tr1 = Vector2(500, 1000) +shader_parameter/tr2 = Vector2(1020, 240) diff --git a/uactl.build b/uactl.build new file mode 100644 index 00000000..7e46a866 --- /dev/null +++ b/uactl.build @@ -0,0 +1,439 @@ +{ + "disabled_build_options": { + + }, + "disabled_classes": [ + "AESContext", + "AStar2D", + "AStar3D", + "AStarGrid2D", + "ActionMapEditor", + "AnimatedSprite2D", + "AnimatedTexture", + "Animation", + "AnimationBezierTrackEdit", + "AnimationLibrary", + "AnimationNode", + "AnimationNodeStateMachinePlayback", + "AnimationNodeStateMachineTransition", + "AnimationPlayer", + "AnimationTrackEditPlugin", + "AnimationTree", + "AspectRatioContainer", + "AtlasTexture", + "AtlasTileProxyObject", + "AudioBusLayout", + "AudioEffect", + "AudioEffectInstance", + "AudioListener2D", + "AudioServer", + "AudioStream", + "AudioStreamPlayback", + "AudioStreamPlayer", + "AudioStreamPlayer2D", + "AudioStreamPreviewGenerator", + "BackBufferCopy", + "BitMap", + "Bone2D", + "BoneMap", + "BoxContainer", + "ButtonGroup", + "CPUParticles2D", + "Camera2D", + "CameraAttributes", + "CameraFeed", + "CameraServer", + "CameraTexture", + "CanvasGroup", + "CanvasItemEditorSelectedItem", + "CanvasItemEditorViewport", + "CanvasLayer", + "CanvasModulate", + "CanvasTexture", + "Cast2DEditor", + "CenterContainer", + "CharFXTransform", + "CheckBox", + "CheckButton", + "ClassDB", + "CollisionObject2D", + "CollisionPolygon2D", + "CollisionShape2D", + "CollisionShape2DEditor", + "ColorPickerButton", + "ColorRect", + "ConfigFile", + "ConnectDialogBinds", + "ControlEditorPopupButton", + "Crypto", + "CryptoKey", + "Curve", + "Curve2D", + "Curve3D", + "CurveTexture", + "CurveXYZTexture", + "DTLSServer", + "DebugAdapterParser", + "DirAccess", + "DisplayServer", + "DynamicFontImportSettingsData", + "ENetConnection", + "EditorAssetLibrary", + "EditorAudioBus", + "EditorAudioMeterNotches", + "EditorBuildProfile", + "EditorDebuggerPlugin", + "EditorDebuggerRemoteObject", + "EditorDebuggerSession", + "EditorExport", + "EditorExportPlatform", + "EditorExportPlugin", + "EditorExportPreset", + "EditorFeatureProfile", + "EditorFileServer", + "EditorFileSystem", + "EditorFileSystemDirectory", + "EditorFileSystemImportFormatSupportQuery", + "EditorImportBlendRunner", + "EditorInspectorCategory", + "EditorInspectorPlugin", + "EditorInspectorSection", + "EditorInterface", + "EditorNode", + "EditorNode3DGizmoPlugin", + "EditorPath", + "EditorPaths", + "EditorPlugin", + "EditorProperty", + "EditorPropertyArrayObject", + "EditorPropertyDictionaryObject", + "EditorPropertyLayersGrid", + "EditorPropertyNameProcessor", + "EditorResourceConversionPlugin", + "EditorResourcePreview", + "EditorResourcePreviewGenerator", + "EditorSceneFormatImporter", + "EditorScenePostImport", + "EditorScenePostImportPlugin", + "EditorScript", + "EditorSelection", + "EditorSettings", + "EditorTranslationParserPlugin", + "EditorUndoRedoManager", + "EditorVCSInterface", + "EncodedObjectAsID", + "Engine", + "EngineDebugger", + "EngineProfiler", + "Environment", + "Expression", + "FileAccess", + "FindInFiles", + "FindInFilesPanel", + "FlowContainer", + "FontVariation", + "GDExtension", + "GDExtensionManager", + "GDScriptNativeClass", + "GDScriptTextDocument", + "GDScriptWorkspace", + "GLTFAccessor", + "GLTFAnimation", + "GLTFBufferView", + "GLTFCamera", + "GLTFDocument", + "GLTFDocumentExtension", + "GLTFLight", + "GLTFMesh", + "GLTFNode", + "GLTFSkeleton", + "GLTFSkin", + "GLTFSpecGloss", + "GLTFState", + "GLTFTexture", + "GLTFTextureSampler", + "GPUParticles2D", + "GPUParticles3DEditorBase", + "Geometry2D", + "Geometry3D", + "Gradient", + "GradientTexture1D", + "GradientTexture2D", + "GraphEdit", + "GraphEditFilter", + "GraphEditMinimap", + "GraphNode", + "GridContainer", + "HMACContext", + "HTTPClient", + "HTTPRequest", + "HashingContext", + "IP", + "Image", + "ImageFormatLoader", + "ImageTexture", + "ImportDefaultsEditorSettings", + "ImportDockParameters", + "ImporterMesh", + "Input", + "InputEvent", + "InputMap", + "InstancePlaceholder", + "ItemList", + "JNISingleton", + "JSON", + "JSONRPC", + "JavaClass", + "JavaClassWrapper", + "JavaScriptBridge", + "JavaScriptObject", + "Joint2D", + "KinematicCollision2D", + "KinematicCollision3D", + "LabelSettings", + "Light2D", + "LightOccluder2D", + "LightmapGIData", + "Lightmapper", + "Line2D", + "LineEdit", + "LinkButton", + "MainLoop", + "MarginContainer", + "Marker2D", + "Marshalls", + "Material", + "MaterialEditor", + "MenuBar", + "MenuButton", + "Mesh", + "MeshDataTool", + "MeshInstance2D", + "MeshInstance3DEditor", + "MeshLibrary", + "MeshLibraryEditor", + "MeshTexture", + "MissingNode", + "MissingResource", + "MovieWriter", + "MultiMesh", + "MultiMeshEditor", + "MultiMeshInstance2D", + "MultiplayerAPI", + "MultiplayerSpawner", + "MultiplayerSynchronizer", + "Mutex", + "NavigationAgent2D", + "NavigationAgent3D", + "NavigationLink2D", + "NavigationLink2DEditor", + "NavigationMesh", + "NavigationMeshEditor", + "NavigationMeshGenerator", + "NavigationObstacle2D", + "NavigationObstacle3D", + "NavigationPathQueryParameters2D", + "NavigationPathQueryParameters3D", + "NavigationPathQueryResult2D", + "NavigationPathQueryResult3D", + "NavigationPolygon", + "NavigationRegion2D", + "NavigationServer2D", + "NavigationServer3D", + "Node3D", + "Node3DEditorViewport", + "Node3DEditorViewportContainer", + "Node3DGizmo", + "Noise", + "NoiseTexture2D", + "OS", + "Occluder3D", + "OccluderPolygon2D", + "OggPacketSequence", + "OggPacketSequencePlayback", + "OpenXRAction", + "OpenXRActionMap", + "OpenXRActionSet", + "OpenXRIPBinding", + "OpenXRInteractionProfile", + "OptionButton", + "PCKPacker", + "PackedDataContainer", + "PackedDataContainerRef", + "PacketPeer", + "ParallaxLayer", + "Path2D", + "PathFollow2D", + "Performance", + "PhysicsDirectBodyState2D", + "PhysicsDirectBodyState3D", + "PhysicsDirectSpaceState2D", + "PhysicsDirectSpaceState3D", + "PhysicsMaterial", + "PhysicsPointQueryParameters2D", + "PhysicsPointQueryParameters3D", + "PhysicsRayQueryParameters2D", + "PhysicsRayQueryParameters3D", + "PhysicsServer2D", + "PhysicsServer2DManager", + "PhysicsServer3D", + "PhysicsServer3DManager", + "PhysicsServer3DRenderingServerHandler", + "PhysicsShapeQueryParameters2D", + "PhysicsShapeQueryParameters3D", + "PhysicsTestMotionParameters2D", + "PhysicsTestMotionParameters3D", + "PhysicsTestMotionResult2D", + "PhysicsTestMotionResult3D", + "PlaceholderTexture2D", + "Polygon2D", + "PolygonPathFinder", + "PortableCompressedTexture2D", + "ProjectSettings", + "RDAttachmentFormat", + "RDFramebufferPass", + "RDPipelineColorBlendState", + "RDPipelineColorBlendStateAttachment", + "RDPipelineDepthStencilState", + "RDPipelineMultisampleState", + "RDPipelineRasterizationState", + "RDPipelineSpecializationConstant", + "RDSamplerState", + "RDShaderFile", + "RDShaderSPIRV", + "RDShaderSource", + "RDTextureFormat", + "RDTextureView", + "RDUniform", + "RDVertexAttribute", + "RandomNumberGenerator", + "Range", + "RayCast2D", + "ReferenceRect", + "RegEx", + "RegExMatch", + "RemoteTransform2D", + "RenderingDevice", + "RenderingServer", + "ResourceFormatLoader", + "ResourceFormatSaver", + "ResourceImporter", + "ResourceLoader", + "ResourcePreloader", + "ResourcePreloaderEditor", + "ResourceSaver", + "ResourceUID", + "RichTextEffect", + "RichTextLabel", + "SceneCacheInterface", + "SceneImportSettingsData", + "SceneRPCInterface", + "SceneReplicationConfig", + "SceneReplicationInterface", + "SceneState", + "SceneTileProxyObject", + "SceneTreeEditor", + "SceneTreeTimer", + "ScriptEditor", + "ScriptExtension", + "ScriptLanguage", + "ScrollContainer", + "SectionedInspectorFilter", + "Semaphore", + "Separator", + "ShaderFileEditor", + "ShaderGlobalsEditorInterface", + "ShaderGlobalsOverride", + "ShaderInclude", + "Shape2D", + "Shape3D", + "ShapeCast2D", + "Shortcut", + "Skeleton2D", + "Skeleton2DEditor", + "SkeletonIK3D", + "SkeletonModification2D", + "SkeletonModificationStack2D", + "SkeletonProfile", + "Skin", + "SkinReference", + "SplitContainer", + "SplitContainerDragger", + "Sprite2DEditor", + "SpriteFrames", + "StreamPeer", + "StyleBoxFlat", + "StyleBoxLine", + "StyleBoxTexture", + "SubViewportContainer", + "SurfaceTool", + "SyntaxHighlighter", + "SystemFont", + "TCPServer", + "TLSOptions", + "TabBar", + "TextEdit", + "TextLine", + "TextParagraph", + "TextServer", + "TextServerManager", + "Texture3D", + "TextureButton", + "TextureLayered", + "TextureRect", + "Theme", + "ThemeDB", + "Thread", + "TileAtlasView", + "TileData", + "TileMap", + "TileMapEditorTerrainsPlugin", + "TileMapEditorTilesPlugin", + "TileMapPattern", + "TileSet", + "TileSetAtlasSourceProxyObject", + "TileSetScenesCollectionProxyObject", + "TileSetSource", + "Time", + "Timer", + "TouchScreenButton", + "Translation", + "TranslationServer", + "Tree", + "TreeItem", + "TriangleMesh", + "Tween", + "Tweener", + "UDPServer", + "UPNP", + "UPNPDevice", + "UndoRedo", + "VideoStream", + "VideoStreamPlayback", + "VideoStreamPlayer", + "ViewPanner", + "Viewport", + "ViewportNavigationControl", + "ViewportRotationControl", + "ViewportTexture", + "VisibleOnScreenNotifier2D", + "VisualShader", + "VisualShaderNode", + "VoxelGIData", + "WeakRef", + "WebRTCPeerConnection", + "WorkerThreadPool", + "World2D", + "World3D", + "WorldEnvironment", + "X509Certificate", + "XMLParser", + "XRInterface", + "XRPose", + "XRPositionalTracker", + "XRServer", + "ZIPPacker", + "ZIPReader" + ], + "type": "build_profile" +} \ No newline at end of file diff --git a/работа.gd b/работа.gd new file mode 100644 index 00000000..8897b3dc --- /dev/null +++ b/работа.gd @@ -0,0 +1,29 @@ +extends Panel + +const TableHeaderType = preload('res://scenes/ячейка-1.tscn') +const TableNodeType = preload('res://scenes/node.tscn') + +const CELI_HEADERS_TEXT = [ 'Параметр', 'Значение' ] +const CELI_HEADER_ALIGMENT = [ HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER ] +const CELI_HEADERS_TYPES = [ TableHeaderType, TableHeaderType ] +const CELI_COLUMNS_SIZE = [ 100, 100 ] +const CELI_NODES_TYPES = [ TableNodeType, TableNodeType ] +const CELI_TEXT = [ [ 'Частота, МГц', '2600' ], \ + [ 'Пееленг', '26' ] ] + + +# Called when the node enters the scene tree for the first time. +func _ready(): + var tbl_celi = get_node('ramka_celi/tbl_celi') + tbl_celi.set_header(CELI_HEADERS_TYPES) + tbl_celi.set_header_text(CELI_HEADERS_TEXT) + tbl_celi.add_row(CELI_NODES_TYPES) + tbl_celi.add_row(CELI_NODES_TYPES) + tbl_celi.set_rows_text(CELI_TEXT) + tbl_celi.set_columns_alignments(CELI_HEADER_ALIGMENT) + tbl_celi.set_columns_min_size(CELI_COLUMNS_SIZE) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass