From e4f31521fad9c2fc05bff34eb883010fe68bfb0f Mon Sep 17 00:00:00 2001 From: sasha80 Date: Thu, 21 Dec 2023 11:30:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=92=D0=B5=D1=80=D1=82=D0=B8=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B5=D0=B6=D0=B8?= =?UTF-8?q?=D0=BC=D0=B0=20"=D0=9A=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C"=20=D0=BD=D0=B5=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BC=D0=B8?= =?UTF-8?q?=D0=BD=D0=B0=D0=B5=D1=82=20=D1=81=D0=B2=D0=BE=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BC=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/pribor-prd-n-1/pribor-prd-n-1.tscn | 18 ++++++++++++------ scenes/контроль/element_v.tscn | 12 +++++++++++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/scenes/pribor-prd-n-1/pribor-prd-n-1.tscn b/scenes/pribor-prd-n-1/pribor-prd-n-1.tscn index ff96924..3cfac5b 100644 --- a/scenes/pribor-prd-n-1/pribor-prd-n-1.tscn +++ b/scenes/pribor-prd-n-1/pribor-prd-n-1.tscn @@ -169,10 +169,11 @@ patch_margin_right = 16 patch_margin_bottom = 16 [node name="ref_A1" parent="ref_ZZ0" instance=ExtResource("3_2shxq")] -offset_left = 7.0 +offset_left = 12.0 offset_top = 5.0 offset_right = 57.0 offset_bottom = 155.0 +self_size = Vector2i(45, 150) fname = "ИП5-25" rname = "A1" @@ -180,7 +181,8 @@ rname = "A1" offset_left = 56.0 offset_top = 5.0 offset_right = 106.0 -offset_bottom = 155.0 +offset_bottom = 148.0 +self_size = Vector2i(50, 143) fname = "ЯУ-07Б" rname = "A2" @@ -188,7 +190,8 @@ rname = "A2" offset_left = 102.0 offset_top = 5.0 offset_right = 152.0 -offset_bottom = 155.0 +offset_bottom = 148.0 +self_size = Vector2i(50, 143) fname = "ЭМС-Г" rname = "A3" @@ -196,7 +199,8 @@ rname = "A3" offset_left = 147.0 offset_top = 5.0 offset_right = 197.0 -offset_bottom = 155.0 +offset_bottom = 148.0 +self_size = Vector2i(50, 143) fname = "УГ" rname = "A4" @@ -204,7 +208,8 @@ rname = "A4" offset_left = 192.0 offset_top = 5.0 offset_right = 242.0 -offset_bottom = 155.0 +offset_bottom = 148.0 +self_size = Vector2i(50, 143) fname = "УКП" rname = "A5" @@ -212,7 +217,8 @@ rname = "A5" offset_left = 237.0 offset_top = 4.0 offset_right = 287.0 -offset_bottom = 154.0 +offset_bottom = 146.0 +self_size = Vector2i(50, 142) fname = "УКП" rname = "A6" diff --git a/scenes/контроль/element_v.tscn b/scenes/контроль/element_v.tscn index e07e9d4..f11ca09 100644 --- a/scenes/контроль/element_v.tscn +++ b/scenes/контроль/element_v.tscn @@ -17,6 +17,15 @@ extends Control @export var textures: Array[Texture] +@export var self_size: Vector2i = Vector2i(50, 150): + set(v): + self_size = v + size = v + $np_rect.size = v + _resize_children() + get: return size + + @export var fname: String: set(v): fname = v @@ -40,12 +49,13 @@ func _resize_children() -> void: func _on_nine_patch_rect_resized() -> void: size = $np_rect.size + self_size = $np_rect.size _resize_children() - func _on_resized() -> void: $np_rect.size = size + self_size = size _resize_children()