JesusJoseph Posted June 15, 2018 Share Posted June 15, 2018 I need to add a help content for the game. I need to set word wrap for the help content. In version 2 I use below code to set word wrap. But in version 3 its not working helpText.setTextBounds(16, 20, 768, 568); Can someone please tell me how to set word wrap in Phaser 3 Thanks for your help Full Code below var helpContent = "Help Content Come here" + "Help Content Come here" + "Help Content Come here"; var style = { font: "24px Arial", align: "left", wordWrap: true, wordWrapWidth: 450 }; var helpText = me.add.text(0, 50, helpContent, style); helpText.setTextBounds(16, 20, 768, 568); Link to comment Share on other sites More sharing options...
squilibob Posted June 15, 2018 Share Posted June 15, 2018 wordWrap is an object var style = = { fontSize: 24, fontFamily: 'Arial', align: "left", wordWrap: { width: 450, useAdvancedWrap: true } } RussiSunni 1 Link to comment Share on other sites More sharing options...
JesusJoseph Posted July 14, 2018 Author Share Posted July 14, 2018 On 6/15/2018 at 12:00 AM, squilibob said: wordWrap is an object var style = = { fontSize: 24, fontFamily: 'Arial', align: "left", wordWrap: { width: 450, useAdvancedWrap: true } } On 6/15/2018 at 12:00 AM, squilibob said: wordWrap is an object var style = = { fontSize: 24, fontFamily: 'Arial', align: "left", wordWrap: { width: 450, useAdvancedWrap: true } } it works thanks Link to comment Share on other sites More sharing options...
Recommended Posts