Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: FadeIn  (Read 1394 times)

0 Members and 1 Guest are viewing this topic.

NaCl

  • Newbie
  • *
  • Posts: 18
    • View Profile
FadeIn
« 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. 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
« Last Edit: July 05, 2013, 09:29:06 pm by NaCl »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: FadeIn
« Reply #1 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.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

NaCl

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: FadeIn
« Reply #2 on: July 06, 2013, 01:42:27 am »
You're a saint! :)
Thanks!

Salt