35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
[gd_scene load_steps=3 format=3 uid="uid://dwgvv4b4a5t1"]
|
|
|
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_pacm1"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_dk54t"]
|
|
script/source = "@tool
|
|
class_name 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)
|
|
"
|
|
|
|
[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 = SubResource("GDScript_dk54t")
|
|
|
|
[node name="grid" type="GridContainer" parent="."]
|
|
layout_mode = 2
|