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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sander

Pages: [1]
1
Graphics / Change opacity for fade out effect
« on: March 18, 2009, 10:20:53 am »
Awesome, got it. Thanks!

2
Graphics / Change opacity for fade out effect
« on: March 17, 2009, 04:57:00 pm »
Hello,

I'm new to SFML and I've been playing around with it for a bit. I'm currently trying to create a pretty standard fade out effect; just fade to black. I've tried changing the opacity using Sprite.Color, but this isn't working. Here's my code;

Code: [Select]
Image img = new Image(640, 480, new Color(0,0,0, 0));

Sprite spr = new Sprite(img);
spr.Color = new Color(0, 0, 0, 100);

Window.Instance.Draw(spr);
Window.Instance.Display();


When drawn, the alpha isn't changed to 100; it's still 0.

So, what's the correct way to do what I'm trying? Thanks.

Edit: Oh, this is C# btw.

Pages: [1]
anything