Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
FlowContainer
繼承: Container < Control < CanvasItem < Node < Object
被繼承: HFlowContainer, VFlowContainer
將子控制項橫向或縱向排列並在邊界處換行的容器。
說明
將子控制項橫向或縱向排列並在邊界處換行的容器。類似於書本中文字在一行中寫不下以後的換行方式。
教學
屬性
|
||
|
||
|
||
|
方法
get_line_count() const |
主題屬性
|
||
|
列舉
enum AlignmentMode: 🔗
AlignmentMode ALIGNMENT_BEGIN = 0
子控制項會被排列在該容器的開頭,如果是垂直朝向則為頂部,如果是水平朝向則為左側(RTL 佈局時為右側)。
AlignmentMode ALIGNMENT_CENTER = 1
子控制項會在該容器裡居中。
AlignmentMode ALIGNMENT_END = 2
子控制項會被排列在該容器的末尾,如果是垂直朝向則為底部,如果是水平朝向則為右側(RTL 佈局時為左側)。
enum LastWrapAlignmentMode: 🔗
LastWrapAlignmentMode LAST_WRAP_ALIGNMENT_INHERIT = 0
The last partially filled row or column will wrap aligned to the previous row or column in accordance with alignment.
LastWrapAlignmentMode LAST_WRAP_ALIGNMENT_BEGIN = 1
The last partially filled row or column will wrap aligned to the beginning of the previous row or column.
LastWrapAlignmentMode LAST_WRAP_ALIGNMENT_CENTER = 2
The last partially filled row or column will wrap aligned to the center of the previous row or column.
LastWrapAlignmentMode LAST_WRAP_ALIGNMENT_END = 3
The last partially filled row or column will wrap aligned to the end of the previous row or column.
屬性說明
AlignmentMode alignment = 0 🔗
void set_alignment(value: AlignmentMode)
AlignmentMode get_alignment()
該容器子節點的對齊方式(必須是 ALIGNMENT_BEGIN、ALIGNMENT_CENTER、ALIGNMENT_END 之一)。
LastWrapAlignmentMode last_wrap_alignment = 0 🔗
void set_last_wrap_alignment(value: LastWrapAlignmentMode)
LastWrapAlignmentMode get_last_wrap_alignment()
The wrap behavior of the last, partially filled row or column (must be one of LAST_WRAP_ALIGNMENT_INHERIT, LAST_WRAP_ALIGNMENT_BEGIN, LAST_WRAP_ALIGNMENT_CENTER, or LAST_WRAP_ALIGNMENT_END).
If true, reverses fill direction. Horizontal FlowContainers will fill rows bottom to top, vertical FlowContainers will fill columns right to left.
When using a vertical FlowContainer with a right to left Control.layout_direction, columns will fill left to right instead.
如果為 true,則 FlowContainer 將垂直排列子節點,而不是水平排列。
使用 HFlowContainer 和 VFlowContainer 時不能改變。
方法說明
返回目前的行數。
主題屬性說明
The horizontal separation of child nodes.
The vertical separation of child nodes.