Text2DNode(position, font, text, rotation, scale, opacity, letter_spacing, line_spacing, color, layer)
Simple 2D sprite node that displays text
Parameters:
position
[value: Vector2, type: Vector2]
font
[value: FontResource, type: FontResource]
text
[value: any, type: string]
rotation
[value: any (radians), type: float]
scale
[value: Vector2, type: Vector2]
opacity
[value: 0 ~ 1.0, type: float]
letter_spacing
[value: any, type: float]
line_spacing
[value: any, type: float]
color
[value: color, type: Color|int (RGB565)]
layer
[value: 0 ~ 127, type: int]
Attributes:
add_child(child)
[returns: None
]
get_child(index)
[returns: Node
]
get_child_count()
[returns: 0 or positive integer
]
mark_destroy()
[returns: None
]
mark_destroy_all()
[returns: None
]
mark_destroy_children()
[returns: None
]
remove_child(child)
[returns: None
]
tick(self, dt)
[returns: None
]
width
[value: any (read-only), type: float]
height
[value: any (read-only), type: float]
position
[value: Vector2, type: Vector2]
global_position
[value: Vector2 (read-only), type: Vector2]
font
[value: FontResource, type: FontResource]
text
[value: any, type: string]
rotation
[value: any (radians), type: float]
scale
[value: Vector2, type: Vector2]
opacity
[value: 0 ~ 1.0, type: float]
letter_spacing
[value: any, type: float]
line_spacing
[value: any, type: float]
color
[value: color, type: Color|int (RGB565)]
layer
[value: 0 ~ 127, type: int]
Overrides:
tick(self, dt)
[returns: None
] [value: function, type: function]
file: src/nodes/2D/text_2d_node.c
landing