Jump to content

Text Bitmap Not Working


Rahman Fadhil
 Share

Recommended Posts

  • 3 weeks later...

What version of Panda did u use ? The one on the master branch, or the develop one ?

In the develop branch, BitmapText has been renamed into Text. You can use it like that:

this.text = new game.Text('Hello', { font: 'Fjalla' }); // The font name can be found inside font.fnt
this.text.anchorCenter();
this.text.position.set(100, 100);
this.text.addTo(game.scene.stage); // or this.stage if you are on the current scene.

You'll also need to have a font file in your media/ folder: media/font.fnt + media/font.png

Then load it, like that:

game.addAsset('font.fnt');

 

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...