seiyria Posted March 3, 2014 Share Posted March 3, 2014 Is there a way to make text less opaque? I've tried setting an opacity property and an alpha property on text when creating it, ala this example: game.add.text(game.world.centerX, game.world.centerY, "Test text!", { font: "65px Arial", fill: "#ff0044", align: "center" alpha: 0.5, opacity: 0.5 });But that doesn't seem to work. Link to comment Share on other sites More sharing options...
rich Posted March 3, 2014 Share Posted March 3, 2014 Set alpha on the Text object itself, not in the font style. Link to comment Share on other sites More sharing options...
seiyria Posted March 3, 2014 Author Share Posted March 3, 2014 I haven't actually looked at a console object, but looking to the docs nothing immediately stuck out. Additionally, taking a look at Text I didn't see any properties related to alpha, unless I'm missing something? Link to comment Share on other sites More sharing options...
lessmilk Posted March 3, 2014 Share Posted March 3, 2014 You can change the opacity of a text like this:var text = game.add.text(x, y, "texte", style};text.alpha = 0.5; nexus_6 and Befive.Info 2 Link to comment Share on other sites More sharing options...
seiyria Posted March 4, 2014 Author Share Posted March 4, 2014 Sure enough, that works. Thanks to both of you! Link to comment Share on other sites More sharing options...
Recommended Posts