diff --git a/scenes/рамка.gd b/scenes/рамка.gd index 0bb06c22..f83e3a38 100644 --- a/scenes/рамка.gd +++ b/scenes/рамка.gd @@ -4,15 +4,15 @@ extends NinePatchRect @export var horizontal_alignment: HorizontalAlignment = HorizontalAlignment.HORIZONTAL_ALIGNMENT_CENTER: - get: return $header.horizontal_alignment - set(val): $header.horizontal_alignment = val + get: return $header.horizontal_alignment if is_inside_tree() else HorizontalAlignment.HORIZONTAL_ALIGNMENT_CENTER + set(val): if is_inside_tree(): $header.horizontal_alignment = val @export var vertical_alignment: VerticalAlignment = VerticalAlignment.VERTICAL_ALIGNMENT_CENTER: - get: return $header.vertical_alignment - set(val): $header.vertical_alignment = val + get: return $header.vertical_alignment if is_inside_tree() else VerticalAlignment.VERTICAL_ALIGNMENT_CENTER + set(val): if is_inside_tree(): $header.vertical_alignment = val @export var text: String = 'caption text': - get: return $header.text - set(val): $header.text = val + get: return $header.text if is_inside_tree() else '' + set(val): if is_inside_tree(): $header.text = val