1 Star 1 Fork 0

天天编程/godot-docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
class_boxcontainer.rst 2.91 KB
一键复制 编辑 原始数据 按行查看 历史
github_url: hide

BoxContainer

Inherits: :ref:`Container<class_Container>` < :ref:`Control<class_Control>` < :ref:`CanvasItem<class_CanvasItem>` < :ref:`Node<class_Node>` < :ref:`Object<class_Object>`

Inherited By: :ref:`ColorPicker<class_ColorPicker>`, :ref:`HBoxContainer<class_HBoxContainer>`, :ref:`VBoxContainer<class_VBoxContainer>`

Base class for box containers.

Description

Arranges child :ref:`Control<class_Control>` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.

Properties

:ref:`AlignMode<enum_BoxContainer_AlignMode>` :ref:`alignment<class_BoxContainer_property_alignment>` 0

Methods

void :ref:`add_spacer<class_BoxContainer_method_add_spacer>` ( :ref:`bool<class_bool>` begin )

Enumerations

enum AlignMode:

  • ALIGN_BEGIN = 0 --- Aligns children with the beginning of the container.
  • ALIGN_CENTER = 1 --- Aligns children with the center of the container.
  • ALIGN_END = 2 --- Aligns children with the end of the container.

Property Descriptions

Default 0
Setter set_alignment(value)
Getter get_alignment()

The alignment of the container's children (must be one of :ref:`ALIGN_BEGIN<class_BoxContainer_constant_ALIGN_BEGIN>`, :ref:`ALIGN_CENTER<class_BoxContainer_constant_ALIGN_CENTER>`, or :ref:`ALIGN_END<class_BoxContainer_constant_ALIGN_END>`).

Method Descriptions

Adds a :ref:`Control<class_Control>` node to the box as a spacer. If begin is true, it will insert the :ref:`Control<class_Control>` node in front of all other children.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ttcode-net/godot-docs.git
git@gitee.com:ttcode-net/godot-docs.git
ttcode-net
godot-docs
godot-docs
master

搜索帮助