hellspawn_bg Posted October 2, 2014 Report Share Posted October 2, 2014 Does anyone know how to anchor the bitmap text to 0.5, 0.5? I know that BitmapText does not have anchor property, but I need to somehow implement this functionality. Cheers Quote Link to comment Share on other sites More sharing options...
lewster32 Posted October 2, 2014 Report Share Posted October 2, 2014 See this thread: http://www.html5gamedevs.com/topic/8347-centering-bitmapfont-working-with-regular-text hellspawn_bg 1 Quote Link to comment Share on other sites More sharing options...
markusT Posted October 2, 2014 Report Share Posted October 2, 2014 I think you have to do this manually by setting a new x or y value based on textWidth or textHeight. text.x -= text.textWidth/2;If you change the text dynamically you have to call updateTransform() first, to receive the right width and height values. text.updateTransform();text.x -= text.textWidth/2; lewster32 and hellspawn_bg 2 Quote Link to comment Share on other sites More sharing options...
hellspawn_bg Posted October 2, 2014 Author Report Share Posted October 2, 2014 Thanks, markus, this works perfectly. Thanks, lewster, somehow I missed those topics. Cheers 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.