fkkcloud Posted March 9, 2016 Share Posted March 9, 2016 this.game.add.text(me.game.world.width * 0.58, me.game.world.height * 0.65, 'hello', { font: headingFont, fill: "#fff", align: 'right', }); I am setting align text to 'right' like above but it does not get applied. Link to comment Share on other sites More sharing options...
Zeterain Posted March 10, 2016 Share Posted March 10, 2016 The right alignment is being applied, you just aren't noticing because your text is only one line long ("hello"). Try changing your text to something with multiple lines: this.game.add.text(me.game.world.width * 0.58, me.game.world.height * 0.65, 'hello\nalign-right\nexample', { font: headingFont, fill: "#fff", align: 'right', }); You should be able to notice the right-align being applied properly. Link to comment Share on other sites More sharing options...
cynge13 Posted December 22, 2016 Share Posted December 22, 2016 You could try to work with setTextBounds. var myText = this.game.add.text(0, 0, 'hello align-right example', { font: headingFont, fill: "#fff", align: 'right', boundsAlignH: 'right', boundsAlignV: 'top' }); myText.setTextBounds(0, 0, this.game.world.width, 0); Link to comment Share on other sites More sharing options...
Recommended Posts