Skip to content

Commit 8e82f22

Browse files
committed
Fixed this return types for Phaser.GameObjects.Text
1 parent 192e03c commit 8e82f22

2 files changed

Lines changed: 50 additions & 50 deletions

File tree

src/gameobjects/text/static/Text.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ var Text = new Class({
588588
*
589589
* @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object.
590590
*
591-
* @return {Phaser.GameObjects.Text} This Text object.
591+
* @return {this} This Text object.
592592
*/
593593
setText: function (value)
594594
{
@@ -629,7 +629,7 @@ var Text = new Class({
629629
*
630630
* @param {object} style - The style settings to set.
631631
*
632-
* @return {Phaser.GameObjects.Text} This Text object.
632+
* @return {this} This Text object.
633633
*/
634634
setStyle: function (style)
635635
{
@@ -663,7 +663,7 @@ var Text = new Class({
663663
*
664664
* @param {string} font - The font family or font settings to set.
665665
*
666-
* @return {Phaser.GameObjects.Text} This Text object.
666+
* @return {this} This Text object.
667667
*/
668668
setFont: function (font)
669669
{
@@ -692,7 +692,7 @@ var Text = new Class({
692692
*
693693
* @param {string} family - The font family.
694694
*
695-
* @return {Phaser.GameObjects.Text} This Text object.
695+
* @return {this} This Text object.
696696
*/
697697
setFontFamily: function (family)
698698
{
@@ -707,7 +707,7 @@ var Text = new Class({
707707
*
708708
* @param {number} size - The font size.
709709
*
710-
* @return {Phaser.GameObjects.Text} This Text object.
710+
* @return {this} This Text object.
711711
*/
712712
setFontSize: function (size)
713713
{
@@ -722,7 +722,7 @@ var Text = new Class({
722722
*
723723
* @param {string} style - The font style.
724724
*
725-
* @return {Phaser.GameObjects.Text} This Text object.
725+
* @return {this} This Text object.
726726
*/
727727
setFontStyle: function (style)
728728
{
@@ -740,7 +740,7 @@ var Text = new Class({
740740
* @param {number} width - The fixed width to set. `0` disables fixed width.
741741
* @param {number} height - The fixed height to set. `0` disables fixed height.
742742
*
743-
* @return {Phaser.GameObjects.Text} This Text object.
743+
* @return {this} This Text object.
744744
*/
745745
setFixedSize: function (width, height)
746746
{
@@ -755,7 +755,7 @@ var Text = new Class({
755755
*
756756
* @param {string} color - The background color.
757757
*
758-
* @return {Phaser.GameObjects.Text} This Text object.
758+
* @return {this} This Text object.
759759
*/
760760
setBackgroundColor: function (color)
761761
{
@@ -775,7 +775,7 @@ var Text = new Class({
775775
*
776776
* @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.
777777
*
778-
* @return {Phaser.GameObjects.Text} This Text object.
778+
* @return {this} This Text object.
779779
*/
780780
setFill: function (fillStyle)
781781
{
@@ -790,7 +790,7 @@ var Text = new Class({
790790
*
791791
* @param {string} color - The text fill color.
792792
*
793-
* @return {Phaser.GameObjects.Text} This Text object.
793+
* @return {this} This Text object.
794794
*/
795795
setColor: function (color)
796796
{
@@ -806,7 +806,7 @@ var Text = new Class({
806806
* @param {string} color - The stroke color.
807807
* @param {number} thickness - The stroke thickness.
808808
*
809-
* @return {Phaser.GameObjects.Text} This Text object.
809+
* @return {this} This Text object.
810810
*/
811811
setStroke: function (color, thickness)
812812
{
@@ -826,7 +826,7 @@ var Text = new Class({
826826
* @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.
827827
* @param {boolean} [shadowFill=true] - Whether to fill the shadow.
828828
*
829-
* @return {Phaser.GameObjects.Text} This Text object.
829+
* @return {this} This Text object.
830830
*/
831831
setShadow: function (x, y, color, blur, shadowStroke, shadowFill)
832832
{
@@ -842,7 +842,7 @@ var Text = new Class({
842842
* @param {number} x - The horizontal shadow offset.
843843
* @param {number} y - The vertical shadow offset.
844844
*
845-
* @return {Phaser.GameObjects.Text} This Text object.
845+
* @return {this} This Text object.
846846
*/
847847
setShadowOffset: function (x, y)
848848
{
@@ -857,7 +857,7 @@ var Text = new Class({
857857
*
858858
* @param {string} color - The shadow color.
859859
*
860-
* @return {Phaser.GameObjects.Text} This Text object.
860+
* @return {this} This Text object.
861861
*/
862862
setShadowColor: function (color)
863863
{
@@ -872,7 +872,7 @@ var Text = new Class({
872872
*
873873
* @param {number} blur - The shadow blur radius.
874874
*
875-
* @return {Phaser.GameObjects.Text} This Text object.
875+
* @return {this} This Text object.
876876
*/
877877
setShadowBlur: function (blur)
878878
{
@@ -887,7 +887,7 @@ var Text = new Class({
887887
*
888888
* @param {boolean} enabled - Whether shadow stroke is enabled or not.
889889
*
890-
* @return {Phaser.GameObjects.Text} This Text object.
890+
* @return {this} This Text object.
891891
*/
892892
setShadowStroke: function (enabled)
893893
{
@@ -902,7 +902,7 @@ var Text = new Class({
902902
*
903903
* @param {boolean} enabled - Whether shadow fill is enabled or not.
904904
*
905-
* @return {Phaser.GameObjects.Text} This Text object.
905+
* @return {this} This Text object.
906906
*/
907907
setShadowFill: function (enabled)
908908
{
@@ -920,7 +920,7 @@ var Text = new Class({
920920
* algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,
921921
* spaces and whitespace are left as is.
922922
*
923-
* @return {Phaser.GameObjects.Text} This Text object.
923+
* @return {this} This Text object.
924924
*/
925925
setWordWrapWidth: function (width, useAdvancedWrap)
926926
{
@@ -939,7 +939,7 @@ var Text = new Class({
939939
* newline characters in place to indicate where breaks should happen.
940940
* @param {object} [scope=null] - The scope that will be applied when the callback is invoked.
941941
*
942-
* @return {Phaser.GameObjects.Text} This Text object.
942+
* @return {this} This Text object.
943943
*/
944944
setWordWrapCallback: function (callback, scope)
945945
{
@@ -958,7 +958,7 @@ var Text = new Class({
958958
*
959959
* @param {string} [align='left'] - The text alignment for multi-line text.
960960
*
961-
* @return {Phaser.GameObjects.Text} This Text object.
961+
* @return {this} This Text object.
962962
*/
963963
setAlign: function (align)
964964
{
@@ -981,7 +981,7 @@ var Text = new Class({
981981
*
982982
* @param {number} value - The resolution for this Text object to use.
983983
*
984-
* @return {Phaser.GameObjects.Text} This Text object.
984+
* @return {this} This Text object.
985985
*/
986986
setResolution: function (value)
987987
{
@@ -999,7 +999,7 @@ var Text = new Class({
999999
*
10001000
* @param {number} value - The amount to add to the font height to achieve the overall line height.
10011001
*
1002-
* @return {Phaser.GameObjects.Text} This Text object.
1002+
* @return {this} This Text object.
10031003
*/
10041004
setLineSpacing: function (value)
10051005
{
@@ -1023,7 +1023,7 @@ var Text = new Class({
10231023
* @param {number} right - The right padding value.
10241024
* @param {number} bottom - The bottom padding value.
10251025
*
1026-
* @return {Phaser.GameObjects.Text} This Text object.
1026+
* @return {this} This Text object.
10271027
*/
10281028
setPadding: function (left, top, right, bottom)
10291029
{
@@ -1082,7 +1082,7 @@ var Text = new Class({
10821082
*
10831083
* @param {integer} [max=0] - The maximum number of lines to draw.
10841084
*
1085-
* @return {Phaser.GameObjects.Text} This Text object.
1085+
* @return {this} This Text object.
10861086
*/
10871087
setMaxLines: function (max)
10881088
{
@@ -1095,7 +1095,7 @@ var Text = new Class({
10951095
* @method Phaser.GameObjects.Text#updateText
10961096
* @since 3.0.0
10971097
*
1098-
* @return {Phaser.GameObjects.Text} This Text object.
1098+
* @return {this} This Text object.
10991099
*/
11001100
updateText: function ()
11011101
{

0 commit comments

Comments
 (0)