instantia

How to change the Bitmap text color?

Recommended Posts

On 5/14/2014 at 9:46 AM, bubamara said:

you can tint BitmapText the same way as sprite :

this.text.tint = 0x223344;

Tint is so processor intensive, that I got from 3 tinted bitmap texts 40 fps loss...... that is phaser 2.4.7

Share this post


Link to post
Share on other sites
On 5/9/2016 at 10:27 AM, Exca said:

You could also change the color of the style. text.style.fill = 0xFF0000; and then update the text text.updateText();

Sorry for the late reply, but it does not work this way. Throws 'fill' of undefined, and updateText is private member - not accessible. The text appears by the way, no problem, but cannot get color. Are you sure that your method works on bitmap text and not on regular one?

Share this post


Link to post
Share on other sites
8 minutes ago, Igor Georgiev said:

Sorry for the late reply, but it does not work this way. Throws 'fill' of undefined, and updateText is private member - not accessible. The text appears by the way, no problem, but cannot get color. Are you sure that your method works on bitmap text and not on regular one?

Ah, sorry, I was thinking of normal text. Bitmap text doesnt have style options.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.