diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-13 15:21:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-13 15:21:50 +0100 |
commit | 26510f4c90628261aec36ad4d1b40ec87b198d45 (patch) | |
tree | 830b23ca02d3c91035394f8c3aa54c733ffeb3f2 /doc/classes | |
parent | c03a5ba09c5b8edb75e0ee7297a3a9d61adcd2d7 (diff) | |
parent | 9d04086451545fb744fbfce8639e8e66327a65c0 (diff) |
Merge pull request #55609 from rcorre/doc-scroll
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/ScrollContainer.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 94d9bfdc31..676c62c93c 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -16,6 +16,12 @@ <argument index="0" name="control" type="Control" /> <description> Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. + [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]: + [codeblock] + add_child(child_node) + await get_tree().process_frame + ensure_control_visible(child_node) + [/codeblock] </description> </method> <method name="get_h_scrollbar"> |