Hello
I have this png file:
Firstly i load it as a texture(using loadfromFile function) and then create a sprite and decide the part of the texture I want to display(using sf::IntRect).
.
.
.
sf::Texture PlayTexture;
if(!PlayTexture.loadfromFile("Play.png"))
return EXIT_FAILURE;
sf::Sprite PlayNotSelected;
PlayNotSelected.setTexture(PlayTexture);
PlayNotSelected.setTextureRect(sf::IntRect(1, 1, 80, 30));
.
.
.
Now when I draw it in my SFML window, which was previously loaded with another sprite having a magenta background, something like this occurs:
My question is how do I remove the white from the png file display it as if it has no background color? And the way I displayed my window background and play.png, is ther any better way to do so?
Like here:
Details:
I browsed the internet to clarify this and came accross terms like color masking or so but didn't understand them quite well. If this preocess has a particular name, please tell me that also
Thanks