Доработка, добавлена возможность клика по отметке цели.
This commit is contained in:
15
scenes/bip.gd
Normal file
15
scenes/bip.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends TextureButton
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_pressed():
|
||||
print_debug('Click')
|
||||
@@ -1,16 +1,37 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://nl1vklubr5kr"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://nl1vklubr5kr"]
|
||||
|
||||
[ext_resource type="Shader" path="res://shaders/bip.gdshader" id="1_k6vue"]
|
||||
[ext_resource type="Shader" path="res://shaders/bip_test.gdshader" id="1_qbah6"]
|
||||
[ext_resource type="Script" path="res://scenes/bip.gd" id="2_77mbp"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2dulj"]
|
||||
shader = ExtResource("1_k6vue")
|
||||
shader = ExtResource("1_qbah6")
|
||||
shader_parameter/color = Color(1, 0.101961, 0.494118, 1)
|
||||
shader_parameter/color_up = Color(1, 1, 1, 1)
|
||||
shader_parameter/tick_update = 0
|
||||
shader_parameter/width = 59.5
|
||||
shader_parameter/band = 0.045
|
||||
shader_parameter/sec_radius = 0.08
|
||||
shader_parameter/dir = 0.0
|
||||
shader_parameter/inner_clip = 0.055
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_tgf76"]
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_w5pye"]
|
||||
|
||||
[node name="bip" type="Sprite2D"]
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 31.0
|
||||
offset_bottom = 30.0
|
||||
|
||||
[node name="bip" type="TextureButton" parent="."]
|
||||
material = SubResource("ShaderMaterial_2dulj")
|
||||
layout_mode = 0
|
||||
offset_left = -15.0
|
||||
offset_top = -15.0
|
||||
offset_right = -12.0
|
||||
offset_bottom = -12.0
|
||||
scale = Vector2(10, 10)
|
||||
texture = SubResource("PlaceholderTexture2D_tgf76")
|
||||
texture_normal = SubResource("PlaceholderTexture2D_w5pye")
|
||||
stretch_mode = 3
|
||||
script = ExtResource("2_77mbp")
|
||||
|
||||
[connection signal="pressed" from="bip" to="bip" method="_on_pressed"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://0uqi1ghf7sma"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c1maea6yhd3k7" path="res://data/кнопка-масштаб.png" id="1_yxc3k"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1maea6yhd3k7" path="res://data/кнопка-масштаб.png" id="1_iq7o5"]
|
||||
|
||||
[node name="btn_scale" type="TextureButton"]
|
||||
self_modulate = Color(1, 1, 1, 0.509804)
|
||||
@@ -8,7 +8,7 @@ offset_right = 152.0
|
||||
offset_bottom = 18.0
|
||||
tooltip_text = "Измененяет масштаб"
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource("1_yxc3k")
|
||||
texture_normal = ExtResource("1_iq7o5")
|
||||
ignore_texture_size = true
|
||||
stretch_mode = 0
|
||||
metadata/i_scale = 0
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://b5kjdyxuwsot5"]
|
||||
|
||||
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://shaders/shader_edu.tres" id="1_rlqpd"]
|
||||
[ext_resource type="Script" path="res://scenes/canvas.gd" id="2_epit6"]
|
||||
[ext_resource type="PackedScene" uid="uid://c73ahpv8uiuc7" path="res://scenes/sector.tscn" id="3_p4snc"]
|
||||
[ext_resource type="Shader" path="res://shaders/sector.gdshader" id="4_uljjp"]
|
||||
[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://shaders/shader_edu.tres" id="1_svpxu"]
|
||||
[ext_resource type="Script" path="res://scenes/canvas.gd" id="2_vajef"]
|
||||
[ext_resource type="PackedScene" uid="uid://c73ahpv8uiuc7" path="res://scenes/sector.tscn" id="3_dswe7"]
|
||||
[ext_resource type="Shader" path="res://shaders/sector.gdshader" id="4_hx35l"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_2bft1"]
|
||||
size = Vector2(1600, 1200)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ekn8l"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ctwvi"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("4_uljjp")
|
||||
shader = ExtResource("4_hx35l")
|
||||
shader_parameter/color = Color(1, 1, 1, 0.168627)
|
||||
shader_parameter/clip_color = Color(1, 0.5, 0.5, 1)
|
||||
shader_parameter/width = 45.0
|
||||
@@ -20,12 +20,12 @@ shader_parameter/dir = 0.08
|
||||
shader_parameter/inner_clip = 0.045
|
||||
|
||||
[node name="canvas" type="Sprite2D"]
|
||||
material = ExtResource("1_rlqpd")
|
||||
material = ExtResource("1_svpxu")
|
||||
texture = SubResource("PlaceholderTexture2D_2bft1")
|
||||
centered = false
|
||||
script = ExtResource("2_epit6")
|
||||
script = ExtResource("2_vajef")
|
||||
|
||||
[node name="строб" parent="." instance=ExtResource("3_p4snc")]
|
||||
material = SubResource("ShaderMaterial_ekn8l")
|
||||
[node name="строб" parent="." instance=ExtResource("3_dswe7")]
|
||||
material = SubResource("ShaderMaterial_ctwvi")
|
||||
position = Vector2(560, 560)
|
||||
scale = Vector2(1100, 1100)
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://3slb0i3pvowc"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/tab-switch.gd" id="1_jjaev"]
|
||||
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_ottu4"]
|
||||
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="3_50u6g"]
|
||||
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="4_jbm5n"]
|
||||
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/эмс.tscn" id="5_014x4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnptm4rlp60dq" path="res://scenes/настройки.tscn" id="6_06u87"]
|
||||
[ext_resource type="Script" path="res://scenes/tab-switch.gd" id="1_be4as"]
|
||||
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа.tscn" id="2_eikhn"]
|
||||
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль.tscn" id="3_voomf"]
|
||||
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал.tscn" id="4_gwdwv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/эмс.tscn" id="5_lqysn"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnptm4rlp60dq" path="res://scenes/настройки.tscn" id="6_aelvp"]
|
||||
|
||||
[node name="tab_switch" type="TabContainer"]
|
||||
offset_right = 1600.0
|
||||
offset_bottom = 1200.0
|
||||
script = ExtResource("1_jjaev")
|
||||
script = ExtResource("1_be4as")
|
||||
|
||||
[node name="Работа" parent="." instance=ExtResource("2_ottu4")]
|
||||
[node name="Работа" parent="." instance=ExtResource("2_eikhn")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Контроль" parent="." instance=ExtResource("3_50u6g")]
|
||||
[node name="Контроль" parent="." instance=ExtResource("3_voomf")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Журнал" parent="." instance=ExtResource("4_jbm5n")]
|
||||
[node name="Журнал" parent="." instance=ExtResource("4_gwdwv")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ЭМС" parent="." instance=ExtResource("5_014x4")]
|
||||
[node name="ЭМС" parent="." instance=ExtResource("5_lqysn")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Настройки" parent="." instance=ExtResource("6_06u87")]
|
||||
[node name="Настройки" parent="." instance=ExtResource("6_aelvp")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
@@ -66,7 +66,7 @@ func _ready():
|
||||
|
||||
|
||||
## Производит отображение цели на диаграмму
|
||||
func map_threat_to_bip(th: threats.Threat, bip: Sprite2D):
|
||||
func map_threat_to_bip(th: threats.Threat, bip: Control):
|
||||
bip.position = tools.pos_calc(
|
||||
th.freq,
|
||||
th.aoa,
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://b276iygic5itk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_p02b1"]
|
||||
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_ypwe8"]
|
||||
[ext_resource type="PackedScene" uid="uid://dem3fcec25awh" path="res://scenes/grd_side.tscn" id="3_c0dic"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="4_h6th4"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnkbk53mi7viu" path="res://scenes/grd_btns.tscn" id="5_6qu62"]
|
||||
[ext_resource type="PackedScene" uid="uid://dymo732qc2doa" path="res://scenes/count_all_pad.tscn" id="6_slsok"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwti82byphl68" path="res://scenes/count_danger_pad.tscn" id="7_ueybb"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_eofgo"]
|
||||
[ext_resource type="PackedScene" uid="uid://0uqi1ghf7sma" path="res://scenes/btn_scale.tscn" id="9_gj0op"]
|
||||
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_hmu4p"]
|
||||
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_cn3uy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dem3fcec25awh" path="res://scenes/grd_side.tscn" id="3_2eau6"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="4_acmpi"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnkbk53mi7viu" path="res://scenes/grd_btns.tscn" id="5_2dg76"]
|
||||
[ext_resource type="PackedScene" uid="uid://dymo732qc2doa" path="res://scenes/count_all_pad.tscn" id="6_nbfk8"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwti82byphl68" path="res://scenes/count_danger_pad.tscn" id="7_q8b60"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_txl8n"]
|
||||
[ext_resource type="PackedScene" uid="uid://0uqi1ghf7sma" path="res://scenes/btn_scale.tscn" id="9_4ie8q"]
|
||||
|
||||
[node name="Работа" type="Panel"]
|
||||
script = ExtResource("1_p02b1")
|
||||
Bip = ExtResource("2_ypwe8")
|
||||
script = ExtResource("1_hmu4p")
|
||||
Bip = ExtResource("2_cn3uy")
|
||||
col_grey = Color(0.34902, 0.643137, 0.772549, 0.168627)
|
||||
col_red = Color(1, 0.568627, 0.431373, 0.239216)
|
||||
drag_scale_band = 0.05
|
||||
drag_scale_width = 0.5
|
||||
freq_high = 6000.0
|
||||
freq_low = 200.0
|
||||
freq_low = 400.0
|
||||
radius_center = Vector2(560, 560)
|
||||
radius_internal = 200.0
|
||||
radius_outter = 550.0
|
||||
@@ -29,31 +29,31 @@ strob_min_width = 5.0
|
||||
metadata/_edit_vertical_guides_ = []
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="grd_side" parent="." instance=ExtResource("3_c0dic")]
|
||||
[node name="grd_side" parent="." instance=ExtResource("3_2eau6")]
|
||||
layout_mode = 0
|
||||
offset_left = 1114.0
|
||||
offset_top = 7.0
|
||||
offset_right = 1594.0
|
||||
offset_bottom = 1170.0
|
||||
|
||||
[node name="canvas" parent="." instance=ExtResource("4_h6th4")]
|
||||
[node name="canvas" parent="." instance=ExtResource("4_acmpi")]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="grd_btns" parent="." instance=ExtResource("5_6qu62")]
|
||||
[node name="grd_btns" parent="." instance=ExtResource("5_2dg76")]
|
||||
layout_mode = 0
|
||||
offset_left = 10.0
|
||||
offset_top = 1116.0
|
||||
offset_right = 1106.0
|
||||
offset_bottom = 1170.0
|
||||
|
||||
[node name="count_all_pad" parent="." instance=ExtResource("6_slsok")]
|
||||
[node name="count_all_pad" parent="." instance=ExtResource("6_nbfk8")]
|
||||
layout_mode = 0
|
||||
offset_left = 100.0
|
||||
offset_top = 117.0
|
||||
offset_right = 133.0
|
||||
offset_bottom = 140.0
|
||||
|
||||
[node name="count_danger_pad" parent="." instance=ExtResource("7_ueybb")]
|
||||
[node name="count_danger_pad" parent="." instance=ExtResource("7_q8b60")]
|
||||
layout_mode = 0
|
||||
offset_left = 96.0
|
||||
offset_top = 29.0
|
||||
@@ -85,7 +85,7 @@ offset_right = 83.0
|
||||
offset_bottom = 72.0
|
||||
text = "Опасных:"
|
||||
|
||||
[node name="btn_auto_threat" parent="." instance=ExtResource("8_eofgo")]
|
||||
[node name="btn_auto_threat" parent="." instance=ExtResource("8_txl8n")]
|
||||
layout_mode = 0
|
||||
offset_left = 1034.0
|
||||
offset_top = 7.0
|
||||
@@ -95,7 +95,7 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Автомат"
|
||||
|
||||
[node name="btn_strob" parent="." instance=ExtResource("8_eofgo")]
|
||||
[node name="btn_strob" parent="." instance=ExtResource("8_txl8n")]
|
||||
layout_mode = 2
|
||||
offset_left = 1034.0
|
||||
offset_top = 67.0
|
||||
@@ -106,7 +106,7 @@ size_flags_vertical = 3
|
||||
tooltip_text = "Кнопка для выбора сектора при помощи клика мышкой"
|
||||
text = "Строб"
|
||||
|
||||
[node name="btn_view" parent="." instance=ExtResource("8_eofgo")]
|
||||
[node name="btn_view" parent="." instance=ExtResource("8_txl8n")]
|
||||
layout_mode = 2
|
||||
offset_left = 874.0
|
||||
offset_top = 1023.0
|
||||
@@ -116,7 +116,7 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
text = "Вид"
|
||||
|
||||
[node name="btn_scale" parent="." instance=ExtResource("9_gj0op")]
|
||||
[node name="btn_scale" parent="." instance=ExtResource("9_4ie8q")]
|
||||
layout_mode = 0
|
||||
offset_left = 952.0
|
||||
offset_top = 1038.0
|
||||
|
||||
Reference in New Issue
Block a user