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...
LabelSettings
Hérite de : Resource < RefCounted < Object
Fournit des paramètres communs pour personnaliser le texte dans un Label.
Description
LabelSettings est une ressource qui fournit des paramètres communs pour personnaliser le texte dans un Label. Elle prendra la priorité sur les propriétés définies dans Control.theme. La ressource peut être partagée entre plusieurs étiquettes et changée à la volée, de sorte que ce soit une façon commode et flexible de configurer un style de texte.
Propriétés
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Méthodes
void |
add_stacked_outline(index: int = -1) |
void |
add_stacked_shadow(index: int = -1) |
get_stacked_outline_color(index: int) const |
|
get_stacked_outline_size(index: int) const |
|
get_stacked_shadow_color(index: int) const |
|
get_stacked_shadow_offset(index: int) const |
|
get_stacked_shadow_outline_size(index: int) const |
|
void |
move_stacked_outline(from_index: int, to_position: int) |
void |
move_stacked_shadow(from_index: int, to_position: int) |
void |
remove_stacked_outline(index: int) |
void |
remove_stacked_shadow(index: int) |
void |
set_stacked_outline_color(index: int, color: Color) |
void |
set_stacked_outline_size(index: int, size: int) |
void |
set_stacked_shadow_color(index: int, color: Color) |
void |
set_stacked_shadow_offset(index: int, offset: Vector2) |
void |
set_stacked_shadow_outline_size(index: int, size: int) |
Descriptions des propriétés
Font utilisée pour le texte.
Color font_color = Color(1, 1, 1, 1) 🔗
Couleur du texte.
Taille du texte.
Espacement vertical supplémentaire entre les lignes (en pixels), l'espacement est ajouté à la descente de la ligne. Cette valeur peut être négative.
Color outline_color = Color(1, 1, 1, 1) 🔗
La couleur du contour.
Taille du contour du texte.
float paragraph_spacing = 0.0 🔗
Espace vertical entre les paragraphes. Ajouté en plus de line_spacing.
Color shadow_color = Color(0, 0, 0, 0) 🔗
Couleur de l'effet d'ombre. Si alpha vaut 0, aucune ombre ne sera dessinée.
Vector2 shadow_offset = Vector2(1, 1) 🔗
Décalage de l'effet d'ombre, en pixels.
Taille de l'effet d'ombre.
int stacked_outline_count = 0 🔗
Le nombre de contours empilés.
Color stacked_outline_{index}/color = Color(0, 0, 0, 1) 🔗
The color of the outline at index.
Note: index is a value in the 0 .. stacked_outline_count - 1 range.
int stacked_outline_{index}/size = 0 🔗
The size of the outline at index.
Note: index is a value in the 0 .. stacked_outline_count - 1 range.
int stacked_shadow_count = 0 🔗
Le nombre d'ombres empilées.
Color stacked_shadow_{index}/color = Color(0, 0, 0, 1) 🔗
The color of the shadow at index.
Note: index is a value in the 0 .. stacked_shadow_count - 1 range.
Vector2 stacked_shadow_{index}/offset = Vector2i(1, 1) 🔗
The offset of the shadow at index.
Note: index is a value in the 0 .. stacked_shadow_count - 1 range.
int stacked_shadow_{index}/outline_size = 0 🔗
The size of the shadow outline at index.
Note: index is a value in the 0 .. stacked_shadow_count - 1 range.
Descriptions des méthodes
void add_stacked_outline(index: int = -1) 🔗
Adds a new stacked outline to the label at the given index. If index is -1, the new stacked outline will be added at the end of the list.
void add_stacked_shadow(index: int = -1) 🔗
Adds a new stacked shadow to the label at the given index. If index is -1, the new stacked shadow will be added at the end of the list.
Color get_stacked_outline_color(index: int) const 🔗
Renvoie la couleur du contour empilé à l'index index.
int get_stacked_outline_size(index: int) const 🔗
Renvoie la taille du contour empilé à l'index index.
Color get_stacked_shadow_color(index: int) const 🔗
Renvoie la couleur de l'ombre empilée à l'index index.
Vector2 get_stacked_shadow_offset(index: int) const 🔗
Renvoie le décalage de l'ombre empilée à l'index index.
int get_stacked_shadow_outline_size(index: int) const 🔗
Renvoie la taille du contour de l'ombre empilée à l'index index.
void move_stacked_outline(from_index: int, to_position: int) 🔗
Déplace le contour empilé à l'index from_index à la position donnée to_position dans le tableau.
void move_stacked_shadow(from_index: int, to_position: int) 🔗
Déplace l'ombre empilée à l'index from_index à la position donnée to_position dans le tableau.
void remove_stacked_outline(index: int) 🔗
Retire le contour empilé à l'index index.
void remove_stacked_shadow(index: int) 🔗
Retire l'ombre empilée à l'index index.
void set_stacked_outline_color(index: int, color: Color) 🔗
Définit la couleur du contour empilé identifié par l'index index donné à color.
void set_stacked_outline_size(index: int, size: int) 🔗
Définit la taille du contour empilé identifié par l'index index donné à size.
void set_stacked_shadow_color(index: int, color: Color) 🔗
Définit la couleur de l'ombre empilée identifiée par l'index index donné à color.
void set_stacked_shadow_offset(index: int, offset: Vector2) 🔗
Définit le décalage de l'ombre empilée identifiée par l'index index donné à offset.
void set_stacked_shadow_outline_size(index: int, size: int) 🔗
Définit la taille du contour de l'ombre empilée identifiée par l'index index donné à size.