From f20b3a48a14f34def41d823fabb476981ef7055e Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 6 Nov 2024 21:00:56 +0100 Subject: next commit --- UI/contain_container.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 UI/contain_container.gd (limited to 'UI/contain_container.gd') diff --git a/UI/contain_container.gd b/UI/contain_container.gd new file mode 100644 index 0000000..df6e3a8 --- /dev/null +++ b/UI/contain_container.gd @@ -0,0 +1,10 @@ +@tool +class_name ContainContainer +extends Container + + +func _notification(what: int) -> void: + if what == NOTIFICATION_SORT_CHILDREN: + for child in get_children(): + if child is Control: + fit_child_in_rect(child, Rect2(Vector2.ZERO, size)) -- cgit v1.2.3