sonolus.script.printing¶
PrintColor
¶
Bases: IntEnum
Print color.
PrintFormat
¶
Bases: IntEnum
Print format.
print_number(value: int | float, *, fmt: PrintFormat, decimal_places: int = 0, anchor: Vec2, pivot: Vec2, dimensions: Vec2, rotation: float = 0, color: PrintColor = PrintColor.THEME, alpha: float = 1, horizontal_align: HorizontalAlign = HorizontalAlign.LEFT, background: bool = False)
¶
Print a number.
Only supported in preview mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
int | float
|
The value to print. |
required |
fmt
|
PrintFormat
|
The print format. |
required |
decimal_places
|
int
|
The number of decimal places. |
0
|
anchor
|
Vec2
|
The anchor. |
required |
pivot
|
Vec2
|
The pivot. |
required |
dimensions
|
Vec2
|
The dimensions. |
required |
rotation
|
float
|
The rotation. |
0
|
color
|
PrintColor
|
The color. |
THEME
|
alpha
|
float
|
The alpha. |
1
|
horizontal_align
|
HorizontalAlign
|
The horizontal alignment. |
LEFT
|
background
|
bool
|
Whether to show a background. |
False
|