Merge remote-tracking branch 'origin/master' into master-prd
This commit is contained in:
@@ -45,7 +45,6 @@ func init_table():
|
||||
$table.set_meta('id', 0)
|
||||
signaller.connect('interfer_selected', Callable(self, 'on_interfer_selected').bind(toggle_btn))
|
||||
signaller.connect('rto_threat_unsel', Callable(self, 'on_rto_threat_unsel'))
|
||||
signaller.connect('emit_changed', Callable(self, 'on_emit_changed').bind(toggle_btn))
|
||||
|
||||
|
||||
## Called when the node enters the scene tree for the first time.
|
||||
@@ -113,8 +112,3 @@ func on_toggle_btn(toggle_btn):
|
||||
if not $table.has_meta('ecm'): return
|
||||
var ecm: interfer.Interfer = $table.get_meta('ecm')
|
||||
ecm.modulation = toggle_btn.button_pressed
|
||||
|
||||
|
||||
func on_emit_changed(state, toggle_btn):
|
||||
if not toggle_btn.disabled:
|
||||
toggle_btn.button_pressed = state
|
||||
|
||||
17
scenes/pribor-externals/externals.gd
Normal file
17
scenes/pribor-externals/externals.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
@tool
|
||||
class_name pribor_externals extends 'res://scenes/контроль/прибор.gd'
|
||||
var UnitPanel = load('res://scenes/контроль/элемент-ю.tscn')
|
||||
|
||||
|
||||
func on_line_changed(unit_inst: unit.Unit, unit_panel: Control): unit_panel.state = unit_inst.online
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
for unit_inst in network.units.values():
|
||||
var unit_panel = UnitPanel.instantiate()
|
||||
unit_panel.fname = unit_inst.name
|
||||
$grid.add_child(unit_panel)
|
||||
unit_inst.connect('line_changed', on_line_changed.bind(unit_panel))
|
||||
on_line_changed(unit_inst, unit_panel)
|
||||
1
scenes/pribor-externals/externals.gd.uid
Normal file
1
scenes/pribor-externals/externals.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://beb41qdahkdp5
|
||||
16
scenes/pribor-externals/externals.tscn
Normal file
16
scenes/pribor-externals/externals.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dwgvv4b4a5t1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://beb41qdahkdp5" path="res://scenes/pribor-externals/externals.gd" id="1_pacm1"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_pacm1"]
|
||||
|
||||
[node name="externals" type="PanelContainer"]
|
||||
offset_left = 71.0
|
||||
offset_top = 75.0
|
||||
offset_right = 756.0
|
||||
offset_bottom = 964.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_pacm1")
|
||||
script = ExtResource("1_pacm1")
|
||||
|
||||
[node name="grid" type="GridContainer" parent="."]
|
||||
layout_mode = 2
|
||||
@@ -5,9 +5,12 @@ extends Node
|
||||
@export var state_colors: Array
|
||||
|
||||
func _on_toggled(toggled_on): $frame.visible = toggled_on
|
||||
func _enter_tree() -> void: $label.self_modulate = state
|
||||
|
||||
|
||||
@export var state: int:
|
||||
set(v):
|
||||
v = 0 if v < 0 else v % state_colors.size()
|
||||
state = v
|
||||
$label.self_modulate = state_colors[v]
|
||||
if is_inside_tree():
|
||||
$label.self_modulate = state_colors[v]
|
||||
|
||||
@@ -6,6 +6,7 @@ extends Panel
|
||||
#TODO: рефактор: заменить подчёркивание на тире
|
||||
const PRIBORS_RES = \
|
||||
{
|
||||
'externals': ['res://scenes/pribor-externals/externals.tscn', 'Контроль подключения внешних систем'],
|
||||
'pribor_prd_k_1': ['res://scenes/pribor-prd-k/pribor-prd-k.tscn', 'Контроль исправности прибора ПРД-К 1'],
|
||||
'pribor_prd_k_2': ['res://scenes/pribor-prd-k/pribor-prd-k.tscn', 'Контроль исправности прибора ПРД-К 2'],
|
||||
'pribor_prd_k_3': ['res://scenes/pribor-prd-k/pribor-prd-k.tscn', 'Контроль исправности прибора ПРД-К 3'],
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://lwmw4egynmd1"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://lwmw4egynmd1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b0wcp76bbl2jx" path="res://scenes/контроль/контроль.gd" id="1_x5d6w"]
|
||||
[ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bb80aigvv648i" path="res://data/кнопка-внешние-0.png" id="2_oysma"]
|
||||
[ext_resource type="Script" uid="uid://bj4nndrurbunl" path="res://scenes/контроль/кнопка-прибора.gd" id="3_4pt7j"]
|
||||
[ext_resource type="Texture2D" uid="uid://dkqlvd750pplc" path="res://data/СПТ.png" id="3_hhadv"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0o8jhb5jbrev" path="res://data/рамка-1.png" id="4_rasbe"]
|
||||
@@ -38,6 +39,59 @@ grow_vertical = 2
|
||||
script = ExtResource("1_x5d6w")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="externals" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для отображения внешних соединений."
|
||||
layout_mode = 0
|
||||
offset_left = 1435.0
|
||||
offset_top = 32.0
|
||||
offset_right = 1691.0
|
||||
offset_bottom = 288.0
|
||||
scale = Vector2(0.5, 0.5)
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource("2_oysma")
|
||||
stretch_mode = 0
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.74, 0.37, 1), Color(0.854902, 0.0705882, 0.0705882, 1)]
|
||||
|
||||
[node name="label" type="Label" parent="externals"]
|
||||
self_modulate = Color(0, 0, 0, 0)
|
||||
layout_mode = 0
|
||||
offset_left = 58.0
|
||||
offset_top = -26.0
|
||||
offset_right = 219.0
|
||||
offset_bottom = -7.0
|
||||
text = "Внешние подключения"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="frame" type="NinePatchRect" parent="externals"]
|
||||
visible = false
|
||||
self_modulate = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
layout_mode = 0
|
||||
offset_left = -32.0
|
||||
offset_top = -12.0
|
||||
offset_right = 123.0
|
||||
offset_bottom = 111.0
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("4_rasbe")
|
||||
region_rect = Rect2(-3, -3, 89, 89)
|
||||
patch_margin_left = 16
|
||||
patch_margin_top = 16
|
||||
patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="externals"]
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(47.9999, 30)
|
||||
scale = Vector2(1.23077, 1.25)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pribor_uf" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -85,7 +139,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(52, -6)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -136,7 +190,7 @@ vertical_alignment = 1
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(55, -15)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -190,7 +244,7 @@ vertical_alignment = 1
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(415, -40)
|
||||
scale = Vector2(3.07692, 3.125)
|
||||
scale = Vector2(3.0, 3.0)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -245,7 +299,7 @@ vertical_alignment = 1
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(425, -40)
|
||||
scale = Vector2(3.07692, 3.125)
|
||||
scale = Vector2(3.0, 3.0)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -297,7 +351,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(45, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.872305
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -350,7 +404,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(40, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -405,7 +459,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(40, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -458,7 +512,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(43, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -511,7 +565,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(34, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -564,7 +618,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(33, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -617,7 +671,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(35, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -670,7 +724,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(34, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -723,7 +777,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(35, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -776,7 +830,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(35, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -828,7 +882,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(41, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -880,7 +934,7 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(40, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
@@ -932,16 +986,16 @@ patch_margin_bottom = 16
|
||||
modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
light_mask = 3
|
||||
position = Vector2(42, -10)
|
||||
scale = Vector2(0.615385, 0.625)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="txr_legend0" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1198.0
|
||||
offset_left = 219.0
|
||||
offset_top = 1135.0
|
||||
offset_right = 1422.0
|
||||
offset_right = 443.0
|
||||
offset_bottom = 1359.0
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("7_6j01w")
|
||||
@@ -949,9 +1003,9 @@ texture = ExtResource("7_6j01w")
|
||||
[node name="lbl_legend0" type="Label" parent="."]
|
||||
self_modulate = Color(1, 1, 1, 0.627451)
|
||||
layout_mode = 0
|
||||
offset_left = 1226.0
|
||||
offset_left = 247.0
|
||||
offset_top = 1136.0
|
||||
offset_right = 1382.0
|
||||
offset_right = 403.0
|
||||
offset_bottom = 1156.0
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "Ожидание результата"
|
||||
@@ -959,27 +1013,27 @@ text = "Ожидание результата"
|
||||
[node name="lbl_legend1" type="Label" parent="."]
|
||||
self_modulate = Color(1, 1, 1, 0.627451)
|
||||
layout_mode = 0
|
||||
offset_left = 1031.0
|
||||
offset_left = 52.0
|
||||
offset_top = 1136.0
|
||||
offset_right = 1104.0
|
||||
offset_right = 125.0
|
||||
offset_bottom = 1156.0
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "Исправно"
|
||||
|
||||
[node name="txr_legend1" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1005.0
|
||||
offset_left = 26.0001
|
||||
offset_top = 1135.0
|
||||
offset_right = 1229.0
|
||||
offset_right = 250.0
|
||||
offset_bottom = 1359.0
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("8_isjua")
|
||||
|
||||
[node name="txr_legend2" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1455.0
|
||||
offset_left = 476.0
|
||||
offset_top = 1135.0
|
||||
offset_right = 1679.0
|
||||
offset_right = 700.0
|
||||
offset_bottom = 1359.0
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("9_ll0vs")
|
||||
@@ -987,9 +1041,9 @@ texture = ExtResource("9_ll0vs")
|
||||
[node name="lbl_legend2" type="Label" parent="."]
|
||||
self_modulate = Color(1, 1, 1, 0.627451)
|
||||
layout_mode = 0
|
||||
offset_left = 1483.0
|
||||
offset_left = 504.0
|
||||
offset_top = 1136.0
|
||||
offset_right = 1527.0
|
||||
offset_right = 548.0
|
||||
offset_bottom = 1156.0
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "Сбой"
|
||||
@@ -1005,6 +1059,7 @@ text = "Контроль исправности прибора"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="toggled" from="externals" to="externals" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_uf" to="pribor_uf" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_rtr" to="pribor_rtr" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_afsp_1" to="pribor_afsp_1" method="_on_toggled"]
|
||||
|
||||
163
scenes/контроль/элемент-ю.tscn
Normal file
163
scenes/контроль/элемент-ю.tscn
Normal file
@@ -0,0 +1,163 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://xj4vbivv3xwp"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="2_isu4f"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="3_07yc3"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="4_348cs"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="5_qwfg5"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hu2vd"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_3rlfa"]
|
||||
script/source = "extends Control
|
||||
|
||||
@export var textures: Array
|
||||
@export var unit_name: String = ''
|
||||
|
||||
|
||||
enum STATE_VAL {
|
||||
NONE = 0,
|
||||
GOOD = 1,
|
||||
ERROR = 2 }
|
||||
|
||||
|
||||
signal pressed(control: PanelContainer)
|
||||
|
||||
|
||||
func _on_button_pressed(): emit_signal('pressed', self)
|
||||
func _ready() -> void: call_deferred('_on_resized')
|
||||
|
||||
|
||||
@export var state: int:
|
||||
set(v):
|
||||
state = tools.clip_value(v, 0, textures.size() - 1)
|
||||
if is_inside_tree():
|
||||
$margin/vbox/grid/state.texture = textures[state]
|
||||
|
||||
|
||||
@export var fname: String:
|
||||
set(v):
|
||||
fname = v
|
||||
if is_inside_tree():
|
||||
$margin/vbox/grid/fname.text = v
|
||||
|
||||
|
||||
func _on_resized() -> void:
|
||||
$rect.size = size
|
||||
$margin.size = size
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if Engine.is_editor_hint(): return
|
||||
$margin/vbox/grid/fname.text = fname
|
||||
$margin/vbox/grid/state.texture = textures[state]
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if Engine.is_editor_hint(): return
|
||||
pass
|
||||
"
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_45hqb"]
|
||||
script/source = "@tool
|
||||
|
||||
extends MarginContainer
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
margins = [8, 8, 8, 8]
|
||||
|
||||
|
||||
@export var margins: Array:
|
||||
set(vals):
|
||||
add_theme_constant_override('margin_top', vals[0])
|
||||
add_theme_constant_override('margin_left', vals[1])
|
||||
add_theme_constant_override('margin_bottom', vals[2])
|
||||
add_theme_constant_override('margin_right', vals[3])
|
||||
get:
|
||||
var vals = [0, 0, 0, 0]
|
||||
vals[0] = get_theme_constant('margin_top')
|
||||
vals[1] = get_theme_constant('margin_left')
|
||||
vals[2] = get_theme_constant('margin_bottom')
|
||||
vals[3] = get_theme_constant('margin_right')
|
||||
return vals
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
|
||||
|
||||
[node name="yelement_yu" type="PanelContainer"]
|
||||
editor_description = "Элемент замены из ЗИП"
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
offset_right = 264.0
|
||||
offset_bottom = 55.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_hu2vd")
|
||||
script = SubResource("GDScript_3rlfa")
|
||||
textures = [ExtResource("2_isu4f"), ExtResource("3_07yc3"), ExtResource("4_348cs")]
|
||||
|
||||
[node name="rect" type="NinePatchRect" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("5_qwfg5")
|
||||
draw_center = false
|
||||
region_rect = Rect2(0, 0, 63, 63)
|
||||
patch_margin_left = 17
|
||||
patch_margin_top = 17
|
||||
patch_margin_right = 17
|
||||
patch_margin_bottom = 15
|
||||
|
||||
[node name="margin" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 8
|
||||
theme_override_constants/margin_top = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
theme_override_constants/margin_bottom = 8
|
||||
script = SubResource("GDScript_45hqb")
|
||||
margins = [8, 8, 8, 8]
|
||||
|
||||
[node name="vbox" type="VBoxContainer" parent="margin"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="grid" type="GridContainer" parent="margin/vbox"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
columns = 3
|
||||
|
||||
[node name="state" type="TextureRect" parent="margin/vbox/grid"]
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource("2_isu4f")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="fname" type="Label" parent="margin/vbox/grid"]
|
||||
self_modulate = Color(1, 1, 1, 0.627451)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 6
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "<Название>"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="button" type="Button" parent="."]
|
||||
custom_minimum_size = Vector2(100, 32)
|
||||
layout_mode = 2
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
|
||||
theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw")
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
|
||||
|
||||
[connection signal="resized" from="." to="." method="_on_resized"]
|
||||
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]
|
||||
@@ -84,9 +84,6 @@ func on_threat_selected(th, ecm_btns): on_rto_threat_sel(th.id, ecm_btns)
|
||||
func on_enter_tree() -> void: call_deferred('on_button_strobe_pressed')
|
||||
|
||||
|
||||
func on_btn_activate(val: bool): signaller.emit_signal('emit_changed', val)
|
||||
|
||||
|
||||
## Обработчик нажатия на кнопку вид.
|
||||
func on_button_view_toggled(toggled: bool):
|
||||
signaller.emit_signal('map_mode_changed', int(toggled))
|
||||
@@ -144,7 +141,7 @@ func _ready():
|
||||
signaller.connect('update_coordinates_map', Callable(self, 'on_update_coordinates_label'))
|
||||
signaller.connect('update_scale_map', Callable(self, 'on_update_scale_label'))
|
||||
on_btn_center_toggled(true)
|
||||
on_btn_activate_toggled(false)
|
||||
on_btn_activate_toggled(true)
|
||||
|
||||
|
||||
func on_user_panning():
|
||||
@@ -308,7 +305,6 @@ func on_button_pressed(btn_this, btn_others) -> void:
|
||||
var interfer_name: String = btn_this.get_meta('rfi_name')
|
||||
for key in fs_selected.keys():
|
||||
fs_arr.append(prd.get_fs_param(key))
|
||||
print(fs_arr)
|
||||
signaller.emit_signal('interfer_init', interfer_name, fs_arr, interfer.POW_DEFAULT)
|
||||
|
||||
|
||||
@@ -514,6 +510,7 @@ func on_btn_center_toggled(toggled_on: bool) -> void:
|
||||
|
||||
func on_btn_activate_toggled(toggled_on: bool) -> void:
|
||||
$btn_activate.tooltip_text = 'Включает подавление (%s)' % ('включено' if toggled_on else 'отключено')
|
||||
signaller.emit_signal('emit_changed', toggled_on)
|
||||
|
||||
|
||||
func on_update_coordinates_label(coordinates_label) -> void:
|
||||
|
||||
@@ -257,6 +257,7 @@ offset_right = 1136.0
|
||||
offset_bottom = 1127.0
|
||||
scale = Vector2(0.5, 0.5)
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource("10_cnr1s")
|
||||
texture_pressed = ExtResource("11_xp4y6")
|
||||
|
||||
@@ -297,15 +297,17 @@ class EmsBoard:
|
||||
if not check_dev_number(): continue
|
||||
if ports.has('%d'%(base_addr_isa + 4)):
|
||||
cur_dev.ports_data[base_addr_isa + 4] = int(ports['%d'%(base_addr_isa + 4)])
|
||||
else: continue
|
||||
else: return false
|
||||
if ports.has('%d'%(base_addr_isa + 6)):
|
||||
cur_dev.ports_data[base_addr_isa + 6] = int(ports['%d'%(base_addr_isa + 6)])
|
||||
else: continue
|
||||
cur_dev.ports_data[base_addr_isa + 6] = int(ports['%d'%(base_addr_isa + 6)])
|
||||
else: return false
|
||||
if ports.has('%d'%(base_addr_isa + 8)):
|
||||
cur_dev.ports_data[base_addr_isa + 8] = int(ports['%d'%(base_addr_isa + 8)])
|
||||
else: continue
|
||||
cur_dev.ports_data[base_addr_isa + 8] = int(ports['%d'%(base_addr_isa + 8)])
|
||||
else: return false
|
||||
if ports.has('%d'%(base_addr_isa + 10)):
|
||||
cur_dev.ports_data[base_addr_isa + 10] = int(ports['%d'%(base_addr_isa + 10)])
|
||||
cur_dev.ports_data[base_addr_isa + 10] = int(ports['%d'%(base_addr_isa + 10)])
|
||||
else: return false
|
||||
return true
|
||||
|
||||
func set_load_done():
|
||||
state_board = LOADING
|
||||
|
||||
@@ -654,6 +654,9 @@ func _on_btn_load_pressed() -> void:
|
||||
if not json_data.has(str(board.id_board)):
|
||||
return
|
||||
var data = json_data[str(board.id_board)]
|
||||
board.btn_load(data)
|
||||
board.need_write = true
|
||||
log.message(log.INFO, 'Произведено чтение настроек ЭМС из файла: %s' %fl_name)
|
||||
var read_ok = board.btn_load(data)
|
||||
if read_ok:
|
||||
board.need_write = true
|
||||
log.message(log.INFO, 'Произведено чтение настроек ЭМС из файла: %s, для платы %s' %[fl_name, board.id_board])
|
||||
else:
|
||||
log.message(log.ERROR, 'Ошибка чтение настроек ЭМС из файла: %s' %fl_name)
|
||||
|
||||
Reference in New Issue
Block a user