Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

BitmapText doesn't react upon creation


Zampano
 Share

Recommended Posts

Hey, I'm trying to tint some of my bitmapText chars.

I do this inside of my create function:

this.intro_text = this.add.bitmapText(640, 280, 'linotte_basic_white_22', text, 20);
this.intro_text.maxWidth = 360;
this.intro_text.tint = 0xf80f6a; //Tried removing that as well
this.intro_text.align = "center";
this.intro_text.alpha = 1;
this.intro_text.anchor.setTo(0.5, 0);

for(var i = 0; i < 18; i++) 
{
	this.intro_text.children[253+i].tint = 0x000000;			
}

The text is now fully colored in 0xf80f6a.
If I put the for loop on a timer of 1 ms, it works.

That's quite an easy workaround, but I wonder why it is even necessary 😐

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...