SFML community forums

Help => Graphics => Topic started by: Recoil on June 13, 2015, 02:07:19 am

Title: VB.NET - change alpha level on sprite?
Post by: Recoil on June 13, 2015, 02:07:19 am
So I have seen this: http://www.sfml-dev.org/tutorials/2.1/graphics-sprite.php

I am able to set my colors like this:
tmpSprite.Color = SFML.Graphics.Color.Green
 

I honestly do not understand how to be able to change it so I can have the 4 channel argb instead.  Does anyone have an idea?

Please let me know what other information would be helpful, in getting an idea...thanks.
Title: Re: VB.NET - change alpha level on sprite?
Post by: G. on June 13, 2015, 02:29:21 am
You can create a Color object. (it is RGBA)
I'm not sure what the syntax is in VB.Net, but from your code and the code in your previous post (http://en.sfml-dev.org/forums/index.php?topic=18233.msg131199#msg131199) I suppose it is something like this (with r g b and a between 0 and 255):
tmpSprite.Color = New SFML.Graphics.Color(r, g, b, a);
Title: Re: VB.NET - change alpha level on sprite?
Post by: Recoil on June 13, 2015, 02:49:09 am
That's it...I can't believe I missed that -_-

Thanks!