instantia Posted May 14, 2014 Share Posted May 14, 2014 How to change the Bitmap text color? this.text = new PIXI.BitmapText('example', {font: "16px nbp", align: "left"});We need to use any filters? Or use a mask? Quote Link to comment Share on other sites More sharing options...
bubamara Posted May 14, 2014 Share Posted May 14, 2014 you can tint BitmapText the same way as sprite :this.text.tint = 0x223344; Befive.Info 1 Quote Link to comment Share on other sites More sharing options...
instantia Posted May 15, 2014 Author Share Posted May 15, 2014 you can tint BitmapText the same way as sprite :this.text.tint = 0x223344;Thank you! Quote Link to comment Share on other sites More sharing options...
Igor Georgiev Posted May 8, 2016 Share Posted May 8, 2016 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 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 8, 2016 Share Posted May 8, 2016 @Igor Georgiev Then you have to pre-tint bitmap font itself. Quote Link to comment Share on other sites More sharing options...
Exca Posted May 9, 2016 Share Posted May 9, 2016 You could also change the color of the style. text.style.fill = 0xFF0000; and then update the text text.updateText(); Quote Link to comment Share on other sites More sharing options...
Igor Georgiev Posted May 10, 2016 Share Posted May 10, 2016 On 5/8/2016 at 3:55 PM, ivan.popelyshev said: @Igor Georgiev Then you have to pre-tint bitmap font itself. what if I want to use the same font in more than one different colour? Quote Link to comment Share on other sites More sharing options...
Igor Georgiev Posted May 10, 2016 Share Posted May 10, 2016 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(); Have not tried that, I will give it a go. Thanks Quote Link to comment Share on other sites More sharing options...
Igor Georgiev Posted June 2, 2016 Share Posted June 2, 2016 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? Quote Link to comment Share on other sites More sharing options...
Exca Posted June 2, 2016 Share Posted June 2, 2016 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. Quote Link to comment Share on other sites More sharing options...
Igor Georgiev Posted June 2, 2016 Share Posted June 2, 2016 Just now, Exca said: Ah, sorry, I was thinking of normal text. Bitmap text doesnt have style options. nice, no worries, @rich says that for the moment, we should use multiple bitmap text atlases Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.