Skip to content

sonolus.script.printing

PrintColor

Bases: IntEnum

Print color.

PrintFormat

Bases: IntEnum

Print format.

print_number(value, *, fmt, decimal_places=0, anchor, pivot, dimensions, rotation=0, color=PrintColor.THEME, alpha=1, horizontal_align=HorizontalAlign.LEFT, background=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