Skip to content

Commit

Permalink
Merge pull request #55921 from rcorre/docscroll3
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Dec 14, 2021
2 parents db020ea + 22fb04b commit e688749
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/classes/ScrollContainer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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.idle_frame]:
[codeblock]
add_child(child_node)
yield(get_tree(), "idle_frame")
ensure_control_visible(child_node)
[/codeblock]
</description>
</method>
<method name="get_h_scrollbar">
Expand Down

0 comments on commit e688749

Please sign in to comment.