diff --git a/v3/src/gameobjects/text/static/Text.js b/v3/src/gameobjects/text/static/Text.js index 376bf4a26..38a7b004c 100644 --- a/v3/src/gameobjects/text/static/Text.js +++ b/v3/src/gameobjects/text/static/Text.js @@ -323,6 +323,16 @@ var Text = new Class({ return result; }, + + getWrappedText: function (text) + { + if (text === undefined) { text = this.text; } + + var wrappedLines = this.runWordWrap(text); + + return wrappedLines.split(/(?:\r\n|\r|\n)/); + }, + setText: function (value) { if (Array.isArray(value))