Phempt Posted October 30, 2014 Share Posted October 30, 2014 Hello guys, I've a text :var textScore = scoreRetrival.toString();textScorePrinted = new game.BitmapText(textScore, {font: "font-game"});textScorePrinted.position.x = yourScore.position.x;textScorePrinted.position.y = yourScore.position.y + textScorePrinted.height;this.stage.addChild(textScorePrinted);If I try to set the anchor with the related function, it doesn't work:textScorePrinted.anchor.set(0.5,0.5);is it possible to set the anchor to Text elements? Quote Link to comment Share on other sites More sharing options...
Stephan Posted October 31, 2014 Share Posted October 31, 2014 No you can't do it directly because the bitmaptext class doesn't have an anchor property. See http://www.goodboydigital.com/pixijs/docs/classes/BitmapText.htmlThere is a workaround however. You could create another class that does support anchor (like a sprite class) and add bitmaptext to this container. Quote Link to comment Share on other sites More sharing options...
Phempt Posted October 31, 2014 Author Share Posted October 31, 2014 Thank you ^^ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.