SFML community forums

Help => Graphics => Topic started by: NaCl on July 05, 2013, 09:26:55 pm

Title: FadeIn
Post by: NaCl on July 05, 2013, 09:26:55 pm
Hi!
I'm asking for a fadeIn and for a fadeOut effect, of course how I could do that.
The problem is, that my background isn't regular and in some cases it is regular, but the alpha value is <255 so that a simple sprite wouldn't work.
It wouldn't be soooo hard*, if I wouldn't want to make it like this (http://abload.de/img/unbenanntj0s3t.png). A smooth fading from left->right and vice versa.

*I would code a class which inherits from sf::xyz and which would give me access to the letters, if possible. It was just an idea, I didn't checked if it would work or not.

Please give me suggestions!  :-\
Thanks! :)

Salt
Title: Re: FadeIn
Post by: zsbzsb on July 06, 2013, 12:20:14 am
This is not directly possible with SFML. A few ideas off the top of my head would be to implement your own sf::Text and draw each letter with a different alpha. Another option would be something similar to render masking as described in this thread (http://en.sfml-dev.org/forums/index.php?topic=7427.0).
Title: Re: FadeIn
Post by: NaCl on July 06, 2013, 01:42:27 am
You're a saint! :)
Thanks!

Salt