Phaser API Documentation

  Version: 
setAlign([align])

Description:

Set the alignment of the text in this Text object.

The argument can be one of: left, right, center or justify.

Alignment only works if the Text object has more than one line of text.

Parameters:

name type arguments Default description
align string <optional> 'left'

The text alignment for multi-line text.

Returns:
Description:

The parent Text object.

Examples:
Since: 3.0.0