From a7371b9a8565682198860730497eca5f717bb976 Mon Sep 17 00:00:00 2001 From: mk360 Date: Fri, 24 Jul 2020 18:48:17 +0300 Subject: [PATCH 1/4] [types] allow Text#setPadding to receive an object --- src/gameobjects/text/static/Text.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index e48bd63e8..193120475 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -1022,9 +1022,9 @@ var Text = new Class({ * @since 3.0.0 * * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object. - * @param {number} top - The top padding value. - * @param {number} right - The right padding value. - * @param {number} bottom - The bottom padding value. + * @param {[number]} top - The top padding value. + * @param {[number]} right - The right padding value. + * @param {[number]} bottom - The bottom padding value. * * @return {this} This Text object. */ From 6915fd3420b153c285249356dd41d711387110c5 Mon Sep 17 00:00:00 2001 From: halilcakar Date: Sun, 9 Aug 2020 19:55:09 +0300 Subject: [PATCH 2/4] Fix incorrect event names in ProcessQueue.js#205, 222 --- src/structs/ProcessQueue.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/structs/ProcessQueue.js b/src/structs/ProcessQueue.js index d1831fd0d..9c38410e4 100644 --- a/src/structs/ProcessQueue.js +++ b/src/structs/ProcessQueue.js @@ -11,7 +11,7 @@ var Events = require('./events'); /** * @classdesc * A Process Queue maintains three internal lists. - * + * * The `pending` list is a selection of items which are due to be made 'active' in the next update. * The `active` list is a selection of items which are considered active and should be updated. * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update. @@ -92,7 +92,7 @@ var ProcessQueue = new Class({ /** * Adds a new item to the Process Queue. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.Structs.ProcessQueue#add @@ -116,7 +116,7 @@ var ProcessQueue = new Class({ /** * Removes an item from the Process Queue. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#remove @@ -140,7 +140,7 @@ var ProcessQueue = new Class({ /** * Removes all active items from this Process Queue. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#removeAll @@ -166,7 +166,7 @@ var ProcessQueue = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -202,7 +202,7 @@ var ProcessQueue = new Class({ { active.splice(idx, 1); - this.emit(Events.REMOVE, item); + this.emit(Events.PROCESS_QUEUE_REMOVE, item); } } @@ -219,7 +219,7 @@ var ProcessQueue = new Class({ this._active.push(item); - this.emit(Events.ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); } list.length = 0; @@ -232,7 +232,7 @@ var ProcessQueue = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * From 8e1b5e757d69056d832af186fc6fad66e8517e6c Mon Sep 17 00:00:00 2001 From: Bulat Khasanov Date: Sun, 9 Aug 2020 23:31:50 +0300 Subject: [PATCH 3/4] Allow to pass font in TextStyle --- src/gameobjects/text/typedefs/TextStyle.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gameobjects/text/typedefs/TextStyle.js b/src/gameobjects/text/typedefs/TextStyle.js index 7a496fdd0..d7fc5e526 100644 --- a/src/gameobjects/text/typedefs/TextStyle.js +++ b/src/gameobjects/text/typedefs/TextStyle.js @@ -7,6 +7,7 @@ * @property {string} [fontFamily='Courier'] - The font the Text object will render with. This is a Canvas style font string. * @property {string} [fontSize='16px'] - The font size, as a CSS size string. * @property {string} [fontStyle] - Any addition font styles, such as 'strong'. + * @property {string} [font] - The font family or font settings to set. Overrides the other font settings. * @property {string} [backgroundColor] - A solid fill color that is rendered behind the Text object. Given as a CSS string color such as `#ff0`. * @property {string} [color='#fff'] - The color the Text is drawn in. Given as a CSS string color such as `#fff` or `rgb()`. * @property {string} [stroke='#fff'] - The color used to stroke the Text if the `strokeThickness` property is greater than zero. From 748e699d43c6c938da0ad0ac3b8358b547bcffe9 Mon Sep 17 00:00:00 2001 From: mk360 Date: Mon, 10 Aug 2020 08:21:26 +0300 Subject: [PATCH 4/4] update setPadding jsdoc --- src/gameobjects/text/static/Text.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index 193120475..03c33b4e1 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -1022,9 +1022,9 @@ var Text = new Class({ * @since 3.0.0 * * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object. - * @param {[number]} top - The top padding value. - * @param {[number]} right - The right padding value. - * @param {[number]} bottom - The bottom padding value. + * @param {number} [top] - The top padding value. + * @param {number} [right] - The right padding value. + * @param {number} [bottom] - The bottom padding value. * * @return {this} This Text object. */