Jump to content

Aligning of single text line


spinnerbox
 Share

Recommended Posts

I just found that Phaser uses Pixi to render text and also found that align property, which by default is 'left' does not apply to single line text. I need it to be centered.

 

I just want to display score text. I can position the field in middle of my text border but only when it has a value of '0'. 

When it has value of '12000' it looks like it is shifted towards right side of the border. 

 

What would you do in this case? What is the best way to pass this problem without changing 'x' coordinate of the text field?

 

I am making a Phaser 2.2.2 game.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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