Skip to content

Commit 2cdb672

Browse files
committed
Added new Text Padding typedef
1 parent 2446e2f commit 2cdb672

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* A Text Padding configuration object as used by the Text Style.
3+
*
4+
* @typedef {object} Phaser.Types.GameObjects.Text.TextPadding
5+
* @since 3.18.0
6+
*
7+
* @property {number} [x] - If set this value is used for both the left and right padding.
8+
* @property {number} [y] - If set this value is used for both the top and bottom padding.
9+
* @property {number} [left] - The amount of padding added to the left of the Text object.
10+
* @property {number} [right] - The amount of padding added to the right of the Text object.
11+
* @property {number} [top] - The amount of padding added to the top of the Text object.
12+
* @property {number} [bottom] - The amount of padding added to the bottom of the Text object.
13+
*/

src/gameobjects/text/typedefs/TextStyle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* @property {string} [stroke='#fff'] - The color used to stroke the Text if the `strokeThickness` property is greater than zero.
1313
* @property {number} [strokeThickness=0] - The thickness of the stroke around the Text. Set to zero for no stroke.
1414
* @property {Phaser.Types.GameObjects.Text.TextShadow} [shadow] - The Text shadow configuration object.
15+
* @property {Phaser.Types.GameObjects.Text.TextPadding} [padding] - A Text Padding object.
1516
* @property {string} [align='left'] - The alignment of the Text. This only impacts multi-line text.
1617
* @property {integer} [maxLines=0] - The maximum number of lines to display within the Text object.
1718
* @property {number} [fixedWidth=0] - Force the Text object to have the exact width specified in this property. Leave as zero for it to change accordingly to content.

0 commit comments

Comments
 (0)