Jump to content

unblurry Phaser.text


smdu57
 Share

Recommended Posts

Hello 

I use Phaser.text in my game. I want to align the text so I use text.anchor.set(0.5). 

On my small text it work fine but on my biggest text it make it blurry

I read on forum to use text.anchor.x = Math.round(text.width * 0.5); but it only make my text disappear

Is there an other way to do or maybe I'm doing it wrong

 question = game.add.text(310,180,questions[nbalea], {fontSize: '32px', fill: '#000' });
    question.anchor.set(0.5);
    question.anchor.x = Math.round(question.width * 0.5);

Thank you

Link to comment
Share on other sites

Thank you 

qestion.autoRound = true don't work as I wanted but question.pivot.x = Math.round(question.width * 0.5); work perfectly. I just added statement for vertical alignement using height and everything work.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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