@@ -297,17 +297,34 @@ Phaser.GameObjectCreator.prototype = {
297297 /**
298298 * Create a new BitmapText object.
299299 *
300+ * BitmapText objects work by taking a texture file and an XML file that describes the font structure.
301+ * It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to
302+ * match the font structure.
303+ *
304+ * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability
305+ * to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by
306+ * processing the font texture in an image editor first, applying fills and any other effects required.
307+ *
308+ * To create multi-line text insert \r, \n or \r\n escape codes into the text string.
309+ *
310+ * To create a BitmapText data files you can use:
311+ *
312+ * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/
313+ * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner
314+ * Littera (Web-based, free): http://kvazars.com/littera/
315+ *
300316 * @method Phaser.GameObjectCreator#bitmapText
301- * @param {number } x - X position of the new bitmapText object.
302- * @param {number } y - Y position of the new bitmapText object.
303- * @param {string } font - The key of the BitmapText font as stored in Game.Cache.
304- * @param {string } [text] - The actual text that will be rendered. Can be set later via BitmapText.text.
305- * @param {number } [size] - The size the font will be rendered in, in pixels.
317+ * @param {number } x - X coordinate to display the BitmapText object at.
318+ * @param {number } y - Y coordinate to display the BitmapText object at.
319+ * @param {string } font - The key of the BitmapText as stored in Phaser.Cache.
320+ * @param {string } [text=''] - The text that will be rendered. This can also be set later via BitmapText.text.
321+ * @param {number } [size=32] - The size the font will be rendered at in pixels.
322+ * @param {string } [align='left'] - The alignment of multi-line text. Has no effect if there is only one line of text.
306323 * @return {Phaser.BitmapText } The newly created bitmapText object.
307324 */
308- bitmapText : function ( x , y , font , text , size ) {
325+ bitmapText : function ( x , y , font , text , size , align ) {
309326
310- return new Phaser . BitmapText ( this . game , x , y , font , text , size ) ;
327+ return new Phaser . BitmapText ( this . game , x , y , font , text , size , align ) ;
311328
312329 } ,
313330
0 commit comments