Jump to content

Line break in text not working


brianautumn
 Share

Recommended Posts

So say I set the text in two lines:

this.labelText = "two\nlines";

this is inside an object so it looks a little wacky 

this.label = callbackContext.add.text(this.x + this.labelPositionX, this.y + this.labelPositionY, this.labelText, this.game.dictionaryFontStyle);

this.label.setShadow(2, 2, 'rgba(0, 0, 0, 0.6)', 4);

 

It only displays the first line. Using the line break works everywhere else but here.

 

here is the font style:

    game.dictionaryFontStyle = {
        font: '28px "museo-sans"',
        fill: '#ffffff',
        align: "center",
        stroke: '#000000',
        strokeThickness: '2'
    };

 

Screen Shot 2016-07-22 at 2.14.44 PM.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...