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.

FlowContainer

Hérite de : Container < Control < CanvasItem < Node < Object

Hérité par : HFlowContainer, VFlowContainer

A container that arranges its child controls horizontally or vertically and wraps them around at the borders.

Description

A container that arranges its child controls horizontally or vertically and wraps them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line.

Tutoriels

Propriétés

AlignmentMode

alignment

0

LastWrapAlignmentMode

last_wrap_alignment

0

bool

reverse_fill

false

bool

vertical

false

Méthodes

int

get_line_count() const

Propriétés du thème

int

h_separation

4

int

v_separation

4


Énumérations

enum AlignmentMode: 🔗

AlignmentMode ALIGNMENT_BEGIN = 0

Les contrôles enfants seront arrangés au début du conteneur, c'est-à-dire en haut si l'orientation est verticale, à gauche si l'orientation est horizontale (à droite pour la mise en page droite-à-gauche).

AlignmentMode ALIGNMENT_CENTER = 1

Les contrôles enfants seront centrés dans le conteneur.

AlignmentMode ALIGNMENT_END = 2

Les contrôles enfants seront arrangés à la fin du conteneur, c'est-à-dire en bas si l'orientation est verticale, à droite si l'orientation est horizontale (à gauche pour la mise en page droite-à-gauche).


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.


Descriptions des propriétés

AlignmentMode alignment = 0 🔗

L'alignement des enfants du conteneur (doit être l'une des constantes ALIGNMENT_BEGIN, ALIGNMENT_CENTER, ou ALIGNMENT_END).


LastWrapAlignmentMode last_wrap_alignment = 0 🔗

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).


bool reverse_fill = false 🔗

  • void set_reverse_fill(value: bool)

  • bool is_reverse_fill()

Si true, inverse la direction de remplissage. Les FlowContainers horizontaux rempliront les lignes de bas en haut, les FlowContainers verticaux rempliront les colonnes de droite à gauche.

Lors de l'utilisation d'un FlowContainer vertical avec une Control.layout_direction de droite à gauche, les colonnes se rempliront à gauche à droite à la place.


bool vertical = false 🔗

  • void set_vertical(value: bool)

  • bool is_vertical()

Si true, le FlowContainer arrangera ses enfants verticalement, plutôt que horizontalement.

Ne peut être changé lors de l'utilisation de HFlowContainer et VFlowContainer.


Descriptions des méthodes

int get_line_count() const 🔗

Renvoie le numéro de la ligne actuelle.


Descriptions des propriétés du thème

int h_separation = 4 🔗

La séparation horizontale des nœuds enfants.


int v_separation = 4 🔗

La séparation verticale des nœuds enfants.