Доработка. WIP Добавление элементов для ЭМС-ТГ

This commit is contained in:
sasha80
2026-03-16 15:41:39 +03:00
parent e52f465654
commit 282a3a5218
6 changed files with 993 additions and 1227 deletions

View File

@@ -6,6 +6,16 @@ extends PanelContainer
@export_range(0.0, 1.0) var gap_bottom: float = 0.05 ## Зазор снизу
@export var ranges_group_name: StringName = 'ranges' ## Имя группы для диапазонов
@export var ranges_save: Dictionary[StringName, Array] ## <имя диапазона>: [диапазон(x - начало, y - конец), цвет]
@export_file var image_file: String:
set(val):
image_file = val
if is_inside_tree():
_enter_tree()
func _enter_tree() -> void:
if ResourceLoader.exists(image_file):
$image.texture = load(image_file)
## Добавляет новый диапазон.

View File

@@ -1,13 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://hr55mkcneaer"]
[gd_scene load_steps=4 format=3 uid="uid://hr55mkcneaer"]
[ext_resource type="Script" uid="uid://jtio1scc72bl" path="res://scenes/hranges/panel.gd" id="1_pg3d7"]
[ext_resource type="Texture2D" uid="uid://c73tjrn8gr00o" path="res://data/Передатчик.png" id="2_ajqhv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ajqhv"]
[node name="panel" type="PanelContainer"]
offset_right = 690.0
offset_bottom = 75.0
offset_right = 340.0
offset_bottom = 40.0
theme_override_styles/panel = SubResource("StyleBoxFlat_ajqhv")
script = ExtResource("1_pg3d7")
[node name="image" type="TextureRect" parent="."]
layout_mode = 2
size_flags_horizontal = 0
texture = ExtResource("2_ajqhv")
expand_mode = 2
[connection signal="resized" from="." to="." method="_on_resized"]