Jump to content

Phaser js Text wrap not working


Adibas03
 Share

Recommended Posts

Just realized that the text wrap function will not take effect if there are no spaces in the text.

while this works 

game.stage.backgroundColor = '#0072bc';

var style = { font: 'bold 20pt Arial', fill: 'white', align: 'left', wordWrap: true, wordWrapWidth: 150 };
	
var text = game.add.text(game.world.centerX, game.world.centerY, "phaser with a sprinkle of pixi dust", style);

 

this does not

game.stage.backgroundColor = '#0072bc';

var style = { font: 'bold 20pt Arial', fill: 'white', align: 'left', wordWrap: true, wordWrapWidth: 150 };
	
var text = game.add.text(game.world.centerX, game.world.centerY, "phaserwithasprinkleofpixidust", style);

 

Is this an issue or is this how it is supposed to be?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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