Phaser API Documentation

  Version: 
setPadding(left, [top], [right], [bottom])

Description:

Set the text padding.

'left' can be an object.

If only 'left' and 'top' are given they are treated as 'x' and 'y'.

Parameters:

name type arguments description
left number | Phaser.Types.GameObjects.Text.TextPadding

The left padding value, or a padding config object.

top number <optional>

The top padding value.

right number <optional>

The right padding value.

bottom number <optional>

The bottom padding value.

Returns:
Description:

This Text object.

Since: 3.0.0