hellspawn_bg Posted October 2, 2014 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 Link to comment Share on other sites More sharing options...
lewster32 Posted October 2, 2014 Share Posted October 2, 2014 See this thread: http://www.html5gamedevs.com/topic/8347-centering-bitmapfont-working-with-regular-text hellspawn_bg 1 Link to comment Share on other sites More sharing options...
markusT Posted October 2, 2014 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; hellspawn_bg and lewster32 2 Link to comment Share on other sites More sharing options...
hellspawn_bg Posted October 2, 2014 Author Share Posted October 2, 2014 Thanks, markus, this works perfectly. Thanks, lewster, somehow I missed those topics. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts