Skip to content

Text object

An object that can be used to display any text on the screen: remaining life counter, some indicators, menu buttons, dialogues... Read more explanations about it.

Text

Displays a text on the screen.

Object actions

Angle
Modify the angle of a Text object.

Color
Change the color of the text. The color is white by default.

Bold
De/activate bold

Gradient
Change the gradient of the text.

Italic
De/activate italic.

Outline
Change the outline of the text. A thickness of 0 disables the outline.

Padding
Set the number of pixels around a text object. If the shadow or the outline around the text are getting cropped, raise this value.

Text shadow
Change the shadow of the text.

Alignment
Set the text alignment of a multiline text object (does not work with single line texts).

Wrapping
De/activate word wrapping. Note that word wrapping is a graphical option,
you can't get the number of lines displayed

Show Shadow
Show the shadow of the text.

Modify the text
Modify the text of a Text object.

Font size
Change the font size of a text object.

Wrapping width
Modify the word wrapping width of a Text object.

Object conditions

Angle
Compare the value of the angle of a Text object.

Bold
Check if the bold style is activated

Italic
Check if the italic style is activated

Wrapping
Test if the word wrapping style of an object is set.

Padding
Compare the number of pixels around a text object. If the shadow or the outline around the text are getting cropped, raise this value.

Compare the text
Compare the text of a Text object.

Font size
Compare the font size of a text object.

Alignment
Compare the text alignment of a multiline text object.

Wrapping width
Test the word wrapping width of a Text object.

Object expressions

Expression Description
Object.Angle() Angle
Object.FontSize() Return the font size of a text object.
Object.Padding() Padding
Object.String() Text

This page is an auto-generated reference page about the Text object feature of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop features here.