Доработка. WIP Отображение кластеров на шкале

This commit is contained in:
sasha80
2026-03-20 16:22:15 +03:00
parent 0fc98c5e98
commit 07b41211c7
4 changed files with 69 additions and 16 deletions

View File

@@ -12,12 +12,21 @@ extends PanelContainer
if is_inside_tree():
_enter_tree()
@export var back_color: Color:
set(val):
back_color = val
if is_inside_tree():
_enter_tree()
var ranges_save: Dictionary[StringName, Array] ## <имя диапазона>: [диапазон(x - начало, y - конец), цвет]
func _enter_tree() -> void:
if ResourceLoader.exists(image_file):
$grid/image.texture = load(image_file)
$grid/canvas.self_modulate = back_color
## Добавляет новый диапазон.

View File

@@ -16,6 +16,7 @@ offset_right = 400.0
offset_bottom = 45.0
theme_override_styles/panel = SubResource("StyleBoxEmpty_ajqhv")
script = ExtResource("1_pg3d7")
back_color = Color(0.601223, 0.601223, 0.601223, 1)
[node name="grid" type="GridContainer" parent="."]
layout_mode = 2
@@ -29,6 +30,7 @@ texture = ExtResource("2_ajqhv")
expand_mode = 3
[node name="canvas" type="PanelContainer" parent="grid"]
self_modulate = Color(0.601223, 0.601223, 0.601223, 1)
layout_mode = 2
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_56wj8")