I want to change the alpha of a sprite without changing any other colours do you know how to if it can be done?
Last edited on
sprite.setColor(sf::Color(255, 255, 255, 127));
replace 127 with any number in range [0, 255]
Last edited on
The alpha attribute is a public field of the sf::Color class, you can set it directly:
http://sfml-dev.org/documentation/2.0/classsf_1_1Color.php#a56dbdb47d5f040d9b78ac6a0b8b3a831
Last edited on
Shit. I read it wrong, getting late where I'm at and my brain is not working 100% lol.