A container that can be expanded/collapsed, with a title that can be filled with controls, such as buttons.
The title can be positioned at the top or bottom of the container.
The container can be expanded or collapsed by clicking the title or by pressing [code]ui_accept[/code] when focused.
Child control nodes are hidden when the container is collapsed. Ignores non-control children.
Can allow grouping with other FoldableContainers, check [member foldable_group] and [FoldableGroup].
</description>
<tutorials>
</tutorials>
<methods>
<methodname="add_title_bar_control">
<returntype="void"/>
<paramindex="0"name="control"type="Control"/>
<description>
Adds a [Control] that will be placed next to the container's title, obscuring the clickable area. Prime usage is adding [Button] nodes, but it can be any [Control].
The control will be added as a child of this container and removed from previous parent if necessary. The controls will be placed aligned to the right, with the first added control being the leftmost one.
</description>
</method>
<methodname="expand">
<returntype="void"/>
<description>
Expands the container and emits [signal folding_changed].
</description>
</method>
<methodname="fold">
<returntype="void"/>
<description>
Folds the container and emits [signal folding_changed].
</description>
</method>
<methodname="remove_title_bar_control">
<returntype="void"/>
<paramindex="0"name="control"type="Control"/>
<description>
Removes a [Control] added with [method add_title_bar_control]. The node is not freed automatically, you need to use [method Node.queue_free].
The [FoldableGroup] associated with the container. When multiple [FoldableContainer] nodes share the same group, only one of them is allowed to be unfolded.
Background used when [FoldableContainer] has GUI focus. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.